private Marker createMarker(LatLng latLng, String label) { DivIcon icon = createIcon(label); Options markerOptions = new Options(); markerOptions.setProperty("icon", icon); Marker marker = new Marker(latLng, markerOptions); return marker; }
private void createNewLocationMarker() { DivIcon icon = createIcon(""); Options markerOptions = new Options(); markerOptions.setProperty("icon", icon); markerOptions.setProperty("draggable", true); newLocationMarker = new Marker(newLatLng(newLocationPresenter.getLatLng()), markerOptions); EventHandlerManager.addEventHandler( newLocationMarker, org.discotools.gwt.leaflet.client.events.handler.EventHandler.Events.dragend, new EventHandler<Event>() { @Override public void handle(Event event) { newLocationPresenter.setLatLng( new AiLatLng( newLocationMarker.getLatLng().lat(), newLocationMarker.getLatLng().lng())); } }); map.addLayer(newLocationMarker); }
public void setShadowUrl(String icon) { markerOptions.setProperty("shadowUrl", icon); getJSObject().setProperty("marker_options", markerOptions.getJSObject()); }
public void setEndIconUrl(String icon) { markerOptions.setProperty("endIconUrl", icon); getJSObject().setProperty("marker_options", markerOptions.getJSObject()); }