I am trying to make an alert during the click event of a vector layer. But its not working properly. didn't show any alert or print in the console.
vmarkers = new OpenLayers.Layer.Vector("Vehicle Overlay", { eventListeners: { 'featureselected': function(evt) { var feature = evt.feature; alert(evt.name); } }, 'featureunselected': function(evt) { out.println("feauture not selected"); } } } ); map.addLayers([gmap_streets, gmap_hybrid, vmarkers]);Thanks in advance
أكثر...
vmarkers = new OpenLayers.Layer.Vector("Vehicle Overlay", { eventListeners: { 'featureselected': function(evt) { var feature = evt.feature; alert(evt.name); } }, 'featureunselected': function(evt) { out.println("feauture not selected"); } } } ); map.addLayers([gmap_streets, gmap_hybrid, vmarkers]);Thanks in advance
أكثر...