public void addMarker(final InfoMarker marker) { double easting = marker.getLonLat().lon(); double northing = marker.getLonLat().lat(); markersPositions.put(easting, northing); markerLayer.addMarker(marker); markersOnMap.add(marker); }
public void applyFilterToStationsOnMap(String filterCategory) { clearMarkerLayer(); for (InfoMarker marker : markersOnMap) { if (marker.getStation().hasStationCategory(filterCategory)) { markerLayer.addMarker(marker); } } }
public void zoomToMarkers() { try { if (markerLayer != null) { Bounds bbox = markerLayer.getDataExtent(); if (bbox != null) { int z = map.getZoomForExtent(bbox, false); map.zoomToExtent(bbox); map.zoomTo(z); } } } catch (Exception e) { if (!GWT.isProdMode()) { GWT.log("", e); } } }
public void zoomToMarkers(Markers markers) { map.zoomToExtent(markers.getDataExtent()); }