/** * Adds marker to center of the screen and returns its coordinate * * @return coordinate added */ private GeoCoordinate selectPosition() { Point center = new Point(map.getWidth() / 2, map.getHeight() / 2); GeoCoordinate gc = map.pixelToGeo(center); if (marker == null) { // create new marker marker = mapFactory.createStandardMarker(gc, 10, null, MapStandardMarker.BALLOON); map.addMapObject(marker); } else { // move existing marker marker.setCoordinate(gc); } return gc; }