Hi

I have problem with dynamically change marker icon (icon is changed to
all markers, not one).
E.g. I have map and 3 markers,
in sidebar I change icon to first marker, it's OK
to second marker OK too
to third (or to first or second again): if I change icon then this
icon is changed in all markers...

This functionallity is only for backend.

Code:
in sidebar list markers with buttons like this:
<a href="javascript:void(0)" class="marker-icon"
onclick="markerIcon(0)"><img src="http://www.google.com/intl/en_ALL/
mapfiles/marker.png" alt="icon" /></a>

function markerIcon(markerItem) {
    //cut - jQueryUI dialog code - /cut

    $('#marker-icons ul li').click(function() { // click on icon from
list
        $('#marker-icons').dialog('close');
        var icon = $(this).find('img').attr('src');
        aMarkers[markerItem].setIcon(icon); // change icon on map,
aMarkers - it's array of object's markers
        $('#marker-sidebar-'+markerItem).find('a.marker-icon
img').attr('src', icon); // change icon in sidebar
    });
}


Sorry for my English.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to