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

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


No, I haven't. Does anyone have a good rule of thumb for scaling these
properties, or is it just sort of a feel it out kind of thing? Thanks, Marc.

On Sat, Aug 15, 2009 at 11:37 AM, Marc Jansen <jansen at terrestris.de> wrote:

> 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
>>
>>
>
>


-- 
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/20090816/a686f4b3/attachment.html


More information about the Users mailing list