Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm displaying gps track data (e.g. points in time, like the path a vehicle covered) and I need to allow the user to "play back" the track, by having the markers change color one at a time in sequence. So imagine a sequence of yellow markers and then during playback I change the first one to a red marker, then the next one, etc.

I've done a prototype using point features because it seemed easier at the time to implement this with Points because I could do the following (pseudo code):

p = getpointFromLayer();  // get the yellow point from the layer = myRedStyle; // change it's style
p.layer.drawFeature(p); // redraw the feature using the red style

Now I'd like to re-do this functionality using Markers because Markers seem to generally be more flexible for other functionality, but I don't know whether it's possible to somehow change a specific marker's appearance. Any ideas?

share|improve this question
My experience is that Markers are way to limited to be useful. Markers are plain DIV-objects while Features are SVG. Thus the styling for Features are way more comprehensive - all things that you can do with Marker can also be done using Feature.Vector. – Martin Algesten Nov 13 '11 at 10:01
I have same problem, any ideas? – hopelephant Jan 16 '12 at 11:13

I have not tried the following code, but I am reasonably sure you should be able to change a marker's icon by simply:


hide it:


enlarge the icon (might pixelize with certain formats):

// 2 = double the size

Look at source ( for more information.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.