public void writeResultForMap(OpenCellIdCell originalCell, DefaultCell chosenHeuristicCell, DefaultCell otherHeuristicCell, double error) {
		try {
			jg.writeObjectFieldStart("cell");
			jg.writeObjectField("lon", originalCell.getCellTowerCoordinates().getX());
			jg.writeObjectField("lat", originalCell.getCellTowerCoordinates().getY());
			jg.writeEndObject();
			
			jg.writeObjectFieldStart("calculatedCell");
//			if(chosenHeuristicCell == null) {
//				
//			}
//			else {
				jg.writeObjectField("lon", chosenHeuristicCell.getCellTowerCoordinates().getX());
				jg.writeObjectField("lat", chosenHeuristicCell.getCellTowerCoordinates().getY());
				jg.writeObjectField("errorDist", error);
//			}
			jg.writeEndObject();
			
			if(otherHeuristicCell != null) {
				jg.writeObjectFieldStart("otherCalculatedCell");
				jg.writeObjectField("lon", otherHeuristicCell.getCellTowerCoordinates().getX());
				jg.writeObjectField("lat", otherHeuristicCell.getCellTowerCoordinates().getY());
				jg.writeEndObject();
			}
			
			jg.writeArrayFieldStart("measurements");
			for(Measurement measurement : originalCell.getMeasurements()) {
				jg.writeStartObject();
				jg.writeObjectField("lon", measurement.getCoordinates().getX());
				jg.writeObjectField("lat", measurement.getCoordinates().getY());
				jg.writeEndObject();
			}
			jg.writeEndArray();
			
			iAmDoneWriting();
			
		} catch (JsonGenerationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}