[OpenLayers-Users] Anyway to set minimum bounding box?

Nicholas Efremov-Kendall n.e.kendall at gmail.com
Sat Aug 15 00:33:33 EDT 2009


Hi All,
I'm happily using map.getCenter in a conditional statement

if( ! map.getCenter() ){
sites.events.register('loadend', sites,
function(){map.zoomToExtent(sites.getDataExtent())});
map.setCenter(null, null);
};

which when my layer is loaded centers on the geometry in the map. This works
great (thanks again, Jan!). The issue I have is when a single POI is loaded,
the map zooms in all the way and I get the "Mose OSM coming soon" tiles
which is not aesthetically pleasing.

I'm going to switch over to a NASA Landsatt, or perhaps an image layer as
the base, but I still think this will be an issue. Is there anyway to
constrain this, or to specify a minimum bounding box or zoom level to
prevent this from happening? The alternative would be to just set the
function on one of my static GML files, but I like this feature. Any
suggestions on how to approach this?



-- 
Nicholas Efremov-Kendall
Fulbright Student 2009-2010, Ukraine
nefremov at artsci.wustl.edu
c/o Halyna Yerko
Balzaka 92a, Kv 27
02232
Kyiv, Ukraine
(mob) +380963576524
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090815/dd9e45f4/attachment.html


More information about the Users mailing list