分享一个逼格很高的地图配色地址,你也可以让你的地图高级起来,多达几百种配色,总有你喜欢的,效果如图,使用方法也在下方。

上地址:Explore Styles - Snazzy Maps - Free Styles for Google Maps

配色代码就在地图详情左侧,使用方法如下:

      var map = new google.maps.Map(mapBox, {
        center: { lat: 23.33471125889383, lng: 113.28933872210398 },
        zoom: 4,
        styles: [
    {
        "featureType": "all",
        "elementType": "all",
        "stylers": [
            {
                "invert_lightness": true
            },
            {
                "saturation": 20
            },
            {
                "lightness": 50
            },
            {
                "gamma": 0.4
            },
            {
                "hue": "#00ffee"
            }
        ]
    },
    {
        "featureType": "all",
        "elementType": "geometry",
        "stylers": [
            {
                "visibility": "simplified"
            }
        ]
    },
    {
        "featureType": "all",
        "elementType": "labels",
        "stylers": [
            {
                "visibility": "on"
            }
        ]
    },
    {
        "featureType": "administrative",
        "elementType": "all",
        "stylers": [
            {
                "color": "#ffffff"
            },
            {
                "visibility": "simplified"
            }
        ]
    },
    {
        "featureType": "administrative.land_parcel",
        "elementType": "geometry.stroke",
        "stylers": [
            {
                "visibility": "simplified"
            }
        ]
    },
    {
        "featureType": "landscape",
        "elementType": "all",
        "stylers": [
            {
                "color": "#405769"
            }
        ]
    },
    {
        "featureType": "water",
        "elementType": "geometry.fill",
        "stylers": [
            {
                "color": "#232f3a"
            }
        ]
    }
]
      });

除此之外,googleMap也提供了自定义地图的方式, 用户可以直接操作,并预览,开发者可根据实际情况操作。

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐