[OpenLayers-Users] Magnifier window
Steve.Toutant at inspq.qc.ca
Steve.Toutant at inspq.qc.ca
Thu Feb 4 16:14:03 EST 2010
Thanks Alexandre,
More detailed...
Per example, a user could watch the whole world and the ov-map will be
zoomed on Chicoutimi. Whatever the user do on the main map (panning,
zooming), I want the ov-map to stick on Chicoutimi, because it is so
beautiful ;-)
But if a layer is selected on the tree I want both maps to show it.
So if I understood well your idea I don't need to add a mapmove event
since the ov-map will have a fix position.
But, cloning layers and add handler function on each node will do what I
expect.
Of course, I need to anchor this new map in the bottom right corner.
Correct me if I'm wrong
thanks again
Steve
Alexandre Dube <adube at mapgears.com>
04/02/2010 03:36 PM
A
Steve.Toutant at inspq.qc.ca
cc
users at openlayers.org
Objet
Re: [OpenLayers-Users] Magnifier window
Hi Steve,
I think you could do something like that (pseudo-code) :
Create your original map
Create all your layers and add them to the map
Create your ov-map
Register a mapmove event to the map to make ov-map follow it
For each layer
Clone it and add it to ov-map
Register a visibilitychange event to a onVisibilityChanged function
onVisibilityChanged: function(event)
var layers = ov-map.getLayersByName(this.name); // this is the layer
the visibility was changed
if(layers && layers.length == 1)
layers[0].setVisibility(this.visibility())
Do you get the idea ?
Best regards,
Alexandre
Steve.Toutant at inspq.qc.ca wrote:
>
> Hi,
> I'm using openlayers with geoext.
> I would like to create a magnifier window. So it is like an overview
> map with a fix map center and a fix zoom level, but the main map and
> this overview map share the same geoext tree, so the layers are
> shown/hidden on both maps.
>
> I think I can do it if I start with the overview map example, here
> http://www.openlayers.org/dev/examples/example-list.html
>
> Does someone have a better idea or already tried this?
>
> thanks in advance
> Steve
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
--
Alexandre Dubé
Mapgears
www.mapgears.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100204/e5f82800/attachment.html
More information about the Users
mailing list