javascript - Google Maps change Marker data without deleting/creating (MarkerWithLabel) -
i change "labelcontent" , "labelclass" dynamically without deleting marker , creating new one.
i know can use markersarray[i].seticon("new-icon.png");
change icon. there equivalents above?
my marker:
marker = new markerwithlabel({ position: loc, map: map, visible: true, labelcontent: "999", labelanchor: new google.maps.point(30, 33), labelclass: "test-label", labelstyle: {opacity: 1.0}, icon: "image1.png" });
shouldn't
markersarray[i]['labelcontent'] = 'new content'; markersarray[i]['icon'] = 'new-icon.png';
work?
Comments
Post a Comment