On 18 September 2010 14:56, Tom Chance <[email protected]> wrote:

> On 18 September 2010 13:41, Arnd Wippermann <[email protected]>wrote:
>
>>  Hi,
>>
>> if you take a SelectFeatureControl for each layer, then you are only able
>> to select features from the upmost layer. If you uncheck the last layer in
>> the layerswitcher you are able to select features from your first kmllayer.
>>
>>     /**
>>      * Constructor: OpenLayers.Control.SelectFeature
>>      * Create a new control for selecting features.
>>      *
>>      * Parameters:
>>      * layers - {<OpenLayers.Layer.Vector>}, or an array of vector layers.
>> The
>>      *     layer(s) this control will select features from.
>>      * options - {Object}
>>      */
>> But you can initialize the SelectFeatureControl with an array of layers
>> instead of an single layer.
>>
>
> That did the trick, thank you very much for the pointer.
>
>
Unfortunately I now have an additional problem. If you click on a marker,
you can close its popup by clicking on the close button. If you click on one
marker and then click on another, the first popup doesn't close, and both
the close buttons affect only the second marker popup.

http://tomchance.dev.openstreetmap.org/london.html

Any help is much appreciated.

Tom

-- 
http://tom.acrewoods.net   http://twitter.com/tom_chance
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to