Vote count:
0
I'm trying to alter just one component of a previously styled map after it has been displayed, but it resets all of the other components unless they are re-defined again in the new style.
Is there a way of doing something like this but in an additive way, rather than a full-replacement way?
var styleUpdate = [
{
featureType: "water",
elementType: "geometry",
stylers: [
{ color: "#ff0000" }
]
}
];
map.setOptions({styles: styleUpdate});
The above resets everything in a pre-defined style to default, except water which turns red (just so it's obviously changed).
asked 1 min ago
Google Maps API - Update style of just 1 item after display
Aucun commentaire:
Enregistrer un commentaire