[OpenLayers-Users] The edges of my map get cut off
Tondo
gpktondo at gmail.com
Tue Sep 4 11:58:36 PDT 2012
Hi
I think it's caused by map.maxExtent. If I am right, this should help you.
It requires little understanding what is bounding box... It's simple enough,
don't worry ;)
Let's say that you have a layer with your picture 100px X 100px. If you
place at 0, 0 upper left corner, bounds will be top: 0, left: 0, right: 100,
bottom: 100. If you place at 0, 0 center, bounds might be +/- 50 and so
on...
This is your invisible wall... Map uses some extent - bounds, that if not
provided, it's calculated. It will not allow you to pan outside this wall -
it's called bounding box. Open your JS debug tool and tap map.getExtent()
and map.maxExtent.
See this:
http://dev.openlayers.org/releases/OpenLayers-2.12/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.maxExtent
--
View this message in context: http://osgeo-org.1560.n6.nabble.com/The-edges-of-my-map-get-cut-off-tp4999122p4999764.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list