コード例 #1
0
 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);
 }
コード例 #2
0
 public void applyFilterToStationsOnMap(String filterCategory) {
   clearMarkerLayer();
   for (InfoMarker marker : markersOnMap) {
     if (marker.getStation().hasStationCategory(filterCategory)) {
       markerLayer.addMarker(marker);
     }
   }
 }
コード例 #3
0
 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);
     }
   }
 }
コード例 #4
0
 public void zoomToMarkers(Markers markers) {
   map.zoomToExtent(markers.getDataExtent());
 }