I want to pan and zoom an OpenLayers.Map to a given OpenLayer.Bounds.

What is a quick way to do this action?

I want to see everything that is in the bounds on the map.

Cheers!

有帮助吗?

解决方案

Please try OpenLayers.Map.zoomToExtent(OpenLayers.Bounds) which will zoom to the passed in bounds and recenter the map.

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