[OpenLayers-Users] OverviewMapControl config tips?

cmose cjmose at gmail.com
Thu Jan 3 21:55:37 EST 2008

Tried again and I must have had something bollocks'd up the last time as it
worked just fine this time. I just need to play with the ratios now to get
the overview map to zoom in more often and I'll be good to go! Thanks much.

cmose wrote:
> Tim,
> Thanks much - I thought that might be the case but I *believe* I tried
> that before (e.g., giving my TileCache config a higher maxResolution then
> my map instance.) I seem to recall that not working the last time I
> attempted it but I'll give it a shot again. It's quite possible I was
> monkeying around with other things at the time and they were the sticky
> wicket.
> Tim Schaub wrote:
>> Hey-
>> cmose wrote:
>>> My map is configured with the following options:
>>> var mapOptions = {
>>>     minExtent: new OpenLayers.Bounds(-1,-1,1,1),
>>>     maxExtent: new OpenLayers.Bounds(-180,-90,180,90),
>>>     restrictedExtent: new OpenLayers.Bounds(-180,-90,180,90),
>>>     maxResolution: 0.17578125,
>>>     numZoomLevels: 8,
>>>     buffer:1
>>> }
>>> and my OverviewMapControl is configured with these options:
>>> var overviewMapOptions = {
>>>     mapOptions: {
>>>         maxResolution: 0.17578125,
>>>         numZoomLevels: 8
>>>     }
>>> }
>> The extent rectangle on the overview map represents the extent of your 
>> main map.  If the resolution of your main map equals the resolution of 
>> your overview map, then the extent rectangle is trying to be as large 
>> (pixel dimension) as your main map viewport.  Assuming your overview map 
>> is smaller than your main map, this means the extent rectangle is trying 
>> to be bigger than the overview map.
>> You need to configure your overview map to display resolutions *greater* 
>> than your main map (more map units per pixel, smaller scale).  You can 
>> accomplish this in one of two ways:
>> 1) decrease the maxResolution of your main map, or
>> 2) increase the maxResolution of your overview map (through the 
>> mapOptions property of the control)
>> The latter may require increasing the max resolution in your TileCache 
>> config as well.
>> Make sense?
>> Tim
>>> (please forgive any typos as this was hand transcribed - the actual
>>> config
>>> is free of typos and works fine with my current TileCache setup).
>>> The issue I have is that the OverviewMapControl is basically useless
>>> from
>>> zoom levels 0-3 - the red "extent" rectangle just fills the entire
>>> OverviewMapControl and can't actually be used to drag the map more then
>>> a
>>> very minuscule amount. I've looked over the js file but I think I'm just
>>> having a poor comprehension day as I'm not seeing what I can change to
>>> try
>>> and alleviate this.
>>> Ideally the draggable rectangle would stay constant size regardless of
>>> the
>>> zoom level of the overviewmap/bounds of the "main" map.
>>> Anyone have any hints/tips as to how I can accomplish this or at least
>>> provide a useable overviewmap at zoom levels 0-3?
>>> Thanks!
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users

View this message in context: http://www.nabble.com/OverviewMapControl-config-tips--tp14598136p14610015.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.

More information about the Users mailing list