json 谷歌地图自定义样式

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了json 谷歌地图自定义样式相关的知识,希望对你有一定的参考价值。

[
    {
        "featureType": "administrative",
        "elementType": "all",
        "stylers": [
            {
                "visibility": "off"
            }
        ]
    },
    {
        "featureType": "administrative.country",
        "elementType": "geometry.stroke",
        "stylers": [
            {
                "visibility": "on"
            },
            {
                "color": "#F7F5F2"
            },
            {
                "weight": 0.8
            }
        ]
    },
    {
        "featureType": "water",
        "elementType": "all",
        "stylers": [
            {
                "color": "#F7F5F2"
            }
        ]
    },
    {
        "featureType": "landscape",
        "elementType": "all",
        "stylers": [
            {
                "color": "#DDD4CB"
            }
        ]
    },
    {
        "featureType": "poi",
        "elementType": "all",
        "stylers": [
            {
                "color": "#DDD4CB"
            }
        ]
    },
    {
        "featureType": "road",
        "elementType": "all",
        "stylers": [
            {
                "visibility": "off"
            }
        ]
    },
    {
        "featureType": "transit",
        "elementType": "all",
        "stylers": [
            {
                "visibility": "off"
            }
        ]
    },
    {
        "featureType": "all",
        "elementType": "labels",
        "stylers": [
            {
                "visibility": "off"
            }
        ]
    }
]

以上是关于json 谷歌地图自定义样式的主要内容,如果未能解决你的问题,请参考以下文章

如何在您的网站中嵌入样式化的谷歌地图

Android Studio 谷歌地图自定义地图,只想显示自定义地图但利用谷歌地图功能

JSON 样式不会改变 MapView 的样式

Android Google Map API 自定义标记在自定义标记上带来谷歌地图数据

百度地图API,如果做一个自定义样式的信息窗口?默认的框框太丑了

谷歌地图上的自定义标记