[OpenLayers-Users] Question on having multiple layers

bradleyspencer brad at cubewerx.com.au
Wed Aug 8 18:25:19 EDT 2007


Ali,

I have done this is what I would call clumsy javascript.

Have a look at the demo at http://ozdemo.getmyip.com/interopDemo.html

To do a getFeatuerInfo (GFI) the user needs to make a layer 'active' and
then I disable all mouse events and register a new doubleclick event for the
GFI request.

The problem I have not solved yet is that once I disable all mouse events I
lose things like doubleclick zoom-recenter and I am unable to reactivate
them after the user makes a subsequent layer active that does not have GFI
capability (i). Maybe you can help me?

Cheers,

Brad....


-----Original Message-----
From: Ali Khan [mailto:akhan at unfpa.org]
Sent: Thursday, 9 August 2007 5:42 AM
To: Eric Lemoine
Cc: users at openlayers.org
Subject: Re: [OpenLayers-Users] Question on having multiple layers

some what. This much I knew already but I was hoping to grab the layer
visible as well so I knew which layer to query data for.

Eric Lemoine wrote:
> On 8/8/07, Ali Khan <akhan at unfpa.org> wrote:
>
>> I'm planning to use the layers param, is there any way to switch the
>> click event to go to a specific url for a specific layer doing this
though?
>>
>
> You can register your own "click on map" callback using something like:
>
> map.events.register('click', map, yourOwnClickCallback);
>
> Does that answer your question?
> --
> Eric
>

_______________________________________________
Users mailing list
Users at openlayers.org
http://openlayers.org/mailman/listinfo/users




More information about the Users mailing list