How to style golf courses in Google Maps(sand dunes and green)?

前端 未结 1 1200
慢半拍i
慢半拍i 2021-01-23 19:07

I am currently using the snazzy maps Ultra Light theme to style my Google Map.

The styling one would expect(landscape) to affect golf courses

{ \"

相关标签:
1条回答
  • 2021-01-23 19:28

    After looking into it for a bit, I found that there is no way to target golf courses intuitively. I tried, administrative, landscape, poi, road, transit, water, and they all did nothing. Google maps in their documentation does mention,

    "Stylers applied to a parent feature type automatically apply to all child feature types. Note however that parent features may include some additional features that are not included in one of their child feature types."

    I tried applying the style to all, i.e.: { "featureType": "all", "elementType": "geometry", "stylers": [ { "color": "#dedede" }, { "lightness": 20 } ] },

    and it actually affected golf courses. By putting all as the first style, and the remainder of the styles after it, "all" acts as a reset of sorts. This is the only current way I have found to specifically target golf courses.

    Updated jsfiddle can be found here

    0 讨论(0)
提交回复
热议问题