I have created the draggable marker using vector layer. Now I have to open a popup at dragend I have tried the following code: vectors = new OpenLayers.Layer.Vector("Vector Layer",{ styleMap: new OpenLayers.StyleMap({ externalGraphic: "images/red-dot.png", graphicOpacity: 1.0, graphicWith: 16, graphicHeight: 26, graphicYOffset: -26 }) });
var drag=new OpenLayers.Control.DragFeature(vectors);
vectors.events.on( { 'dragend': onFeatureSelect, 'dragstart': onFeatureUnselect } function onFeatureSelect(evt) { try {
function onFeatureUnselect(evt) { feature = evt.feature; if (feature.popup) { popup.feature = null; map1.removePopup(feature.popup); feature.popup.destroy(); feature.popup = null; } } function onPopupClose(evt) {
but it is not working. Please suggest any solution. asked 17 Sep '12, 12:33 Niki Kallurwar SomeoneElse ♦ |
There are a bunch of OpenLayers mailing lists described here, and other useful resources, including an IRC channel, here.