Answer the question
In order to leave comments, you need to log in
Positioning popup in openlayers
Greetings!
There is a map with OpenStreetMap. On the map markers move along with balloons (popups).
I add a marker with a balloon to the same coordinate (LonLat) on the map.
map.addPopup(popup);
markerLayer.addMarker(marker);
var newLonLat = new OpenLayers.LonLat(newLon,newLat).transform(projection.from,projection.to);
var newPx = map.getLayerPxFromLonLat(newLonLat);
marker.moveTo(newPx);
popup.moveTo(newPx);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question