-1
我想放大EPSG:3857投影的地图上的边界框。地图应该放大到这里的某个地方:Openlayers zoomtoextent缩放到另一个位置
https://www.google.co.il/maps/place/Netanya/@32.3047285,34.860532,12z/data=!3m1!4b1!4m2!3m1!1s0x151d400493c075d5:0x2cd995be543c3f22,但是将下面的代码放到非洲附近海域的某个地方。你能让我知道什么是错的吗?
bounds = new OpenLayers.Bounds();
bounds.extend(new OpenLayers.LonLat(34.8660822,32.3172887));
bounds.extend(new OpenLayers.LonLat(34.8570271,32.2953077));
bounds.toBBOX();
map.openlayers.zoomToExtent(bounds);
map.openlayers.updateSize();