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

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -