Closed camerynbrock closed 2 years ago
Are you referring to something similar to their example where you can show / hide (buttons in the top left corner of the map) feature labels?
Hi, thanks for your quick response. That doesn't look like what I mean - what I mean is similar to the option for toggling off and on labels when using the satellite background.
I am looking for a terrain basemap without labels or the option to put the labels on top of other layers. The reason is because I am using add_overlay to add an image over the map, so the labels beneath the overlay are cut off or not visible at all (screenshots here are from the google maps platform site).
Oh I see. I'm not sure I've seen that functionality anywhere in the google maps docs, so I don't know off the top of my head if it's possible or not.
Aha - figured this out if anyone else ends up being interested. Used styles code from https://mapstyle.withgoogle.com/
google_map(key = mapKey)
style <- '[{"elementType": "labels", "stylers": [{"visibility": "off"}]},
{"featureType": "administrative.neighborhood", "stylers": [{"visibility": "off"}]},
{"featureType": "road", "stylers": [{"visibility": "off"}]}]'
google_map(key = mapKey,
styles = style)
Does this approach allow you
the option to put the labels on top of other layers
?
This package is great! I was wondering if it is possible to remove reference labels (i.e., the strings denoting the cities/states/etc.), or to give them a separate z_index to put on top of polygons/overlays? This would be very helpful if so.
Thank you!