/** * Checks if a marker has been added to the map. * * @param marker The marker to check. * @return true, if the marker has been added to the map. */ public boolean hasMarker(GoogleMapMarker marker) { return getState(false).markers.containsKey(marker.getId()); }
/** * Adds a marker to the map. * * @param marker The marker to add. */ public void addMarker(GoogleMapMarker marker) { getState().markers.put(marker.getId(), marker); }
/** * Removes a marker from the map. * * @param marker The marker to remove. */ public void removeMarker(GoogleMapMarker marker) { getState().markers.remove(marker.getId()); }
/** * Adds a new marker to the map. * * @param caption Caption of the marker shown when the marker is hovered. * @param position Coordinates of the marker on the map. * @param draggable Set true to enable dragging of the marker. * @param iconUrl The url of the icon of the marker. * @return GoogleMapMarker object created with the given settings. */ public GoogleMapMarker addMarker(String caption, LatLon position, boolean draggable, String iconUrl) { GoogleMapMarker marker = new GoogleMapMarker(caption, position, draggable, iconUrl); getState().markers.put(marker.getId(), marker); return marker; }