In the Google Map's javascript API you can call map.getBounds().getNorthEast() or map.getBounds().getSouthWest(), which returns the coordindates for the currently visible viewport.

Is there an equivalent in OpenLayers?

有帮助吗?

解决方案

OpenLayers.Map.getExtent() is what you're looking for.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top