[OpenLayers-Users] Unable to select Highlighted Vector Layer

Smaran Harihar smaran.harihar at gmail.com
Thu Jun 7 10:47:24 PDT 2012


Hi,

I am using the following
example<http://openlayers.org/dev/examples/highlight-feature.html>,
to select a vector layer feature on click. The example demonstrates
Highlighting and selecting the layer. I was able to successfully implement
the Highlighting of the layer but I am not able to select the layer.

This is my code

    var highlightCtrl = new
OpenLayers.Control.SelectFeature([vector_layer,QuebecSpecies], {
                    hover: true,
                    highlightOnly: true,
                    renderIntent: "temporary",
                    eventListeners: {
                        beforefeaturehighlighted: report,
                        featurehighlighted: report,
                        featureunhighlighted: report
                    }
                });

    var selectCtrl = new OpenLayers.Control.SelectFeature([vector_layer],
                    {clickout: true}
                );

    map.addControl(highlightCtrl);
    map.addControl(selectCtrl);

    highlightCtrl.activate();
    selectCtrl.activate();

Where am I falling short?

-- 
Thanks & Regards
Smaran Harihar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120607/5e0ac31d/attachment.html>


More information about the Users mailing list