I want to create a balloon for a KML file that dynamically moves.
The example that I am working on is sundials.html.
Let's say that the KML is moving.
How we would get the balloon to move as well?
dynamickmlopenlayers-2
I want to create a balloon for a KML file that dynamically moves.
The example that I am working on is sundials.html.
Let's say that the KML is moving.
How we would get the balloon to move as well?
Best Answer
I'm not really sure what you mean by "let's say that the KML is moving", but if you want to change the location of a popup after it has been created, here's how you do it:
If you have a vector, such as a sundial, and it's lonlat changes, and you want the popup to move to the new center, you can do this:
You can paste the first example into firebug on the sundials example and it should work straight away.
The OpenLayers API doesn't mention that the updateSize function updates the center, so it's possible that this behavior will disappear at some point.