public void zoomToMarkers(Markers markerlist) { map.zoomToExtent(markerlist.getDataExtent()); }
public void zoomToMarkers(Markers markers) { map.zoomToExtent(markers.getDataExtent()); }
public void zoomToMarkers() { Bounds bbox = markerLayer.getDataExtent(); if (bbox != null) { map.setCenter(bbox.getCenterLonLat()); if (markersOnMap.size() > 1) { map.zoomToExtent(bbox); } else { map.zoomTo(DEFAULT_ZOOM_LEVEL); } } }
OverviewMap.this.map.zoomToExtent(b);
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); } } }
/** * Draw aoi on map. * * @param wkt * the wkt */ public void drawAoiOnMap(String wkt) { this.eraseFeatures(); MultiPolygon geom = MultiPolygon.narrowToMultiPolygon(Geometry.fromWKT(wkt).getJSObject()); geom.transform(new Projection("EPSG:4326"), new Projection("EPSG:900913")); VectorFeature vectorFeature = new VectorFeature(geom); this.vector.addFeature(vectorFeature); this.map.zoomToExtent(geom.getBounds()); }
public void zoomToExtent(BoundingBox bbox) { String srs = bbox.getSrs(); String destSrs = getMapProjection(); EastingNorthing ll = bbox.getLowerLeftCorner(); EastingNorthing ur = bbox.getUpperRightCorner(); LonLat lowerleft = new LonLat(ll.getEasting(), ll.getNorthing()); LonLat upperright = new LonLat(ur.getEasting(), ur.getNorthing()); if ( !srs.equalsIgnoreCase(destSrs)) { lowerleft.transform(srs, destSrs); upperright.transform(srs, destSrs); } map.zoomToExtent(new Bounds(lowerleft.lon(), lowerleft.lat(), upperright.lon(), upperright.lat())); }