Can you somehow reference other markers inside a marker? Link markers together, even though they have different locations on a map.
Let’s say I have two types of markers for each person:
1st marker is the location of where the person lives, 2nd marker is the location of where the person works.
Say there are many of these markers on my map. You hover over one. The one you’ve hovered over and the second marker that is linked to that marker(associated with the same person) is highlighted.
How would you do that, theoretically?
I have an example, the idea is to keep an object (hash) or array of the various people, and when creating markers, assign who it belongs to (
marker.owner). Later when it is selected, retrieve whose marker it is, and change the others from this information. The code below can be shortened, but the way it is left spread open you can see step-by-step what’s going on.http://jsfiddle.net/afTLh/