[OpenLayers-Users] non-zooming overviewmap

Bart van den Eijnden (OSGIS) bartvde at osgis.nl
Thu Jan 4 02:47:19 EST 2007


Hi Tim, list,

just to let you know the overviewmap does update correctly after a
mergeNewParams call now I've switched to 2.3RC1, so I actually did not have
to change any of my code.

Thanks.

Best regards,
Bart

> -----Oorspronkelijk bericht-----
> Van: users-bounces at openlayers.org
> [mailto:users-bounces at openlayers.org]Namens Tim Schaub
> Verzonden: woensdag 3 januari 2007 20:19
> Aan: users at openlayers.org
> Onderwerp: Re: [OpenLayers-Users] non-zooming overviewmap
> 
> 
> > Another slightly related question, how do I update the overview map? 
> > When I call a mergeNewParams (to update the SLD_BODY 
> > parameter to show a selection in the keymap) on the layer 
> > which is in the overview map, the overview map does not 
> > update. It only updates after a zoom or pan in the main map. 
> > How can I trigger an update/drawing event in the keymap? I 
> > was unsuccessful so far with everything I tried.
> 
> If you assign the overview map control to a variable when you construct it
> (overview), then you can get at the overview's map with:
> 
>   overview.ovmap
> 
> To merge new parameters to the base layer of the overview map, I would do:
> 
>   overview.ovmap.baseLayer.mergeNewParams()
> 
> It sounds like you're doing something like this, but it's not working.  It
> should - so write back if it actually isn't.  If you don't send your
> overview map control any layers when you construct it, then it will clone
> the main map's base layer - so it is not enough to merge new params on the
> main map's base layer.
> 
> Also, to force a redraw of a layer, you can always try something like:
> 
>   overview.ovmap.baseLayer.moveTo(null, true)
> 
> There may be another way to force a redraw, but this one works.
> 
> Also, regarding the overview map recentering itself - if it bugs you that
it
> recenters itself in a way that shows more than what you specified in
> maxExtent, add a comment to ticket #340
> (http://trac.openlayers.org/ticket/340).  The overview's map is just like
> any other map.  Currently, all maps can be panned beyond the max extent.
> This ticket is supposed to be a place for discussion on the issue.
> 
> Tim






More information about the Users mailing list