CloudMade/Leaflet — Issue #349: Redraw/remove CircleMarkers
Author: AnnieX
Created: 2011-10-27 10:51:00+00:00
State: open

Hey!

I'm pretty new to Leaflet and Javascript, and I've been working with visualization of Oslo Metro map.
So this is my idea and what I'm stuck with:

I have a station.geojson where every stations have a coordinate and bigStation-atrribute (and other attributes), meaning that big stations have the value 1 and small stations have value 0.

The idea is that every circlemarkers on the map will have the same design by default. When the user is clicking on a big station, I want the node to change design/options, for example the color is changing from gray to red and radius is changing fram 4px to 7px. When the user is clicking on another node, the previous node will change back to the default design/options.

My thought was to utilize the bigStation-attribute, but somehow I couldn't manage to redraw og remove the circlemarkers for every click.

Can someone please help me out or give me pieces of advice? Thanks!