Oleg Ignatov


Hello, All.
I add some number of controls into my map by map.AddControl(label) method.
How can I relate my controls with my map I want my controls changes their position after a change in the center point of my map.
Thanks.



Re: how can I relate my controls with a map

SoulSolutions


I could re-word your question to say that currently you can add a <div> to the map but only at a given pixel postion, it would be a great feature to be able to add it at a lat/long so as the map panned / zoomed so would the div. The div could be hidden when not in the map view.

The only way to do this currently is to manually update the div's position. You choose the map events that are of interest (for performance i only hide the divs when panning and then redraw them when the user stops, rather then making them redraw every pixel) and manually call the latlongtopixel() method.

John.