0

Please tell me why we use:

max Extent: new Open Layers.Bounds(
        -20037508.34, -20037508.34, 20037508.34, 20037508.34) 

when adding Google Maps layer in OpenLayers? i.e. please tell me about this function? )

1

You can set a maxExtent that differs from the default maxExtent in order to be able to zoom to this maxExtent with the OpenLayers.Control.ZoomToMaxExtent.

Your maxExtent is nearly the whole world-Extent (-180, -85.05112877980659, 180, 85.0511287798066) but could be set to a smaller area.

See this jsfiddle: http://jsfiddle.net/expedio/cpthr93m/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.