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

Marc Jansen jansen at terrestris.de
Sat Aug 15 04:37:48 EDT 2009


Hi Nicholas,

have you set the minExtent and maxExtent properties on the map-Object?

Regards,

Marc

Nicholas Efremov-Kendall schrieb:
> 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 <mailto:nefremov at artsci.wustl.edu>
> c/o Halyna Yerko
> Balzaka 92a, Kv 27
> 02232
> Kyiv, Ukraine
> (mob) +380963576524
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>   




More information about the Users mailing list