Closed GoogleCodeExporter closed 8 years ago
You are not using the correct technique for changing the value of labelClass.
In your maptypeid_changed event handler, change
markersArray[i].labelClass = 'gmapLabelsWhite';
to
markersArray[i].set("labelClass", 'gmapLabelsWhite');
and change
markersArray[i].labelClass = 'gmapLabelsBlk';
to
markersArray[i].set("labelClass", 'gmapLabelsBlk');
Note that you should always use the "set" function to change the values of
properties, don't try to change them directly because there are often other
actions that need to be performed. As the MarkerWithLabel Reference says: "To
change any of these additional properties after the labeled marker has been
created, call google.maps.Marker.set(propertyName, propertyValue)."
Original comment by garylitt...@gmail.com
on 23 Aug 2011 at 5:57
Aha. I changed the code as per your comment and it works now. Thanks much for
the help. I did not see the 'set' method in the docs.
Original comment by robertln...@gmail.com
on 23 Aug 2011 at 2:18
Original issue reported on code.google.com by
robertln...@gmail.com
on 22 Aug 2011 at 7:02