百度地图个性化配色方案
由于项目中需要对百度地图样式调整以使其与页面整体风格保持统一,在此记录下蓝色系的样式设置
该样式设置在15级~17级时显示效果尚可,效果如下
皮肤设置如下:
var baiduMapStyle = [ { "featureType": "land", "elementType": "geometry", "stylers": { "color": "#1d63edff" } }, { "featureType": "manmade", "elementType": "geometry", "stylers": { "color": "#1d63edff" } }, { "featureType": "water", "elementType": "geometry", "stylers": { "color": "#000fbcff" } }, { "featureType": "water", "elementType": "labels.text.fill", "stylers": { "color": "#2b74fdff", "weight": 10 } }, { "featureType": "water", "elementType": "labels.text.stroke", "stylers": { "color": "#2b74fd1a" } },{ "featureType": "road", "elementType": "geometry.fill", "stylers": { "color": "#286ef8ff" } }, { "featureType": "road", "elementType": "geometry.stroke", "stylers": { "color": "#000265ff", "weight": "8" } }, { "featureType": "districtlabel", "elementType": "labels.text.fill", "stylers": { "color": "#d69563ff" } }, { "featureType": "districtlabel", "elementType": "labels.text.stroke", "stylers": { "color": "#17263cff", "weight": 3 } }, { "featureType": "poilabel", "elementType": "labels.text.fill", "stylers": { "color": "#d69563ff" } }, { "featureType": "poilabel", "elementType": "labels.text.stroke", "stylers": { "color": "#17263cff", "weight": 3 } }, { "featureType": "subway", "elementType": "geometry", "stylers": { "visibility": "off" } }, { "featureType": "railway", "elementType": "geometry", "stylers": { "visibility": "off" } }, { "featureType": "poilabel", "elementType": "labels.icon", "stylers": { "visibility": "off" } }, { "featureType": "subwaylabel", "elementType": "labels", "stylers": { "visibility": "off" } }, { "featureType": "subwaylabel", "elementType": "labels.icon", "stylers": { "visibility": "off" } }, { "featureType": "tertiarywaysign", "elementType": "labels", "stylers": { "visibility": "off" } }, { "featureType": "tertiarywaysign", "elementType": "labels.icon", "stylers": { "visibility": "off" } }, { "featureType": "provincialwaysign", "elementType": "labels.icon", "stylers": { "visibility": "off" } }, { "featureType": "provincialwaysign", "elementType": "labels", "stylers": { "visibility": "off" } }, { "featureType": "nationalwaysign", "elementType": "labels.icon", "stylers": { "visibility": "off" } }, { "featureType": "nationalwaysign", "elementType": "labels", "stylers": { "visibility": "off" } }, { "featureType": "highwaysign", "elementType": "labels.icon", "stylers": { "visibility": "off" } }, { "featureType": "highwaysign", "elementType": "labels", "stylers": { "visibility": "off" } }, { "featureType": "green", "elementType": "geometry.fill", "stylers": { "color": "#000087ff" } }, { "featureType": "nationalwaysign", "elementType": "labels.text.fill", "stylers": { "color": "#d0021bff" } }, { "featureType": "nationalwaysign", "elementType": "labels.text.stroke", "stylers": { "color": "#052fb9ff" } }, { "featureType": "city", "elementType": "labels", "stylers": { "visibility": "on" } }, { "featureType": "city", "elementType": "labels.icon", "stylers": { "visibility": "off" } }, { "featureType": "city", "elementType": "labels.text.fill", "stylers": { "color": "#d69563ff" } }, { "featureType": "city", "elementType": "labels.text.stroke", "stylers": { "color": "#17263cff" } }, { "featureType": "local", "elementType": "geometry.fill", "stylers": { "color": "#38414eff" } }, { "featureType": "local", "elementType": "geometry.stroke", "stylers": { "color": "#000265ff", "weight": 10 } }, { "featureType": "fourlevelway", "elementType": "geometry.fill", "stylers": { "color": "#286ef8ff" } }, { "featureType": "fourlevelway", "elementType": "geometry.stroke", "stylers": { "color": "#000265ff", "weight": "8" } }, { "featureType": "tertiaryway", "elementType": "geometry.fill", "stylers": { "color": "#286ef8ff" } }, { "featureType": "tertiaryway", "elementType": "geometry.stroke", "stylers": { "color": "#052fb9ff", "weight": "8" } }, { "featureType": "tertiaryway", "elementType": "labels.text.fill", "stylers": { "color": "#759879ff" } }, { "featureType": "fourlevelway", "elementType": "labels.text.fill", "stylers": { "color": "#759879ff" } }, { "featureType": "highway", "elementType": "labels.text.fill", "stylers": { "color": "#759879ff" } }, { "featureType": "highway", "elementType": "geometry.fill", "stylers": { "color": "#286ef8ff" } }, { "featureType": "highway", "elementType": "geometry.stroke", "stylers": { "color": "#000265ff", "weight": "8" } }, { "featureType": "provincialway", "elementType": "geometry.fill", "stylers": { "color": "#286ef8ff" } }, { "featureType": "provincialway", "elementType": "geometry.stroke", "stylers": { "color": "#000265ff", "weight": "8" } }, { "featureType": "tertiaryway", "elementType": "labels.text.stroke", "stylers": { "color": "#1a2e1cff" } }, { "featureType": "fourlevelway", "elementType": "labels.text.stroke", "stylers": { "color": "#1a2e1cff" } }, { "featureType": "highway", "elementType": "labels.text.stroke", "stylers": { "color": "#1a2e1cff" } }, { "featureType": "nationalway", "elementType": "labels.text.stroke", "stylers": { "color": "#1a2e1cff" } }, { "featureType": "nationalway", "elementType": "labels.text.fill", "stylers": { "color": "#759879ff" } }, { "featureType": "nationalway", "elementType": "geometry.fill", "stylers": { "color": "#286ef8ff" } }, { "featureType": "nationalway", "elementType": "geometry.stroke", "stylers": { "color": "#000265ff", "weight": "8" } }, { "featureType": "cityhighway", "elementType": "geometry.fill", "stylers": { "color": "#286ef8ff" } }, { "featureType": "cityhighway", "elementType": "geometry.stroke", "stylers": { "color": "#000265ff", "weight": "8" } }, { "featureType": "arterial", "elementType": "geometry.fill", "stylers": { "color": "#286ef8ff" } }, { "featureType": "arterial", "elementType": "geometry.stroke", "stylers": { "color": "#000265fa", "weight": "8" } }, { "featureType": "medicallabel", "elementType": "labels", "stylers": { "visibility": "off" } }, { "featureType": "medicallabel", "elementType": "labels.icon", "stylers": { "visibility": "off" } }, { "featureType": "entertainmentlabel", "elementType": "labels", "stylers": { "visibility": "off" } }, { "featureType": "entertainmentlabel", "elementType": "labels.icon", "stylers": { "visibility": "off" } }, { "featureType": "estatelabel", "elementType": "labels", "stylers": { "visibility": "off" } }, { "featureType": "estatelabel", "elementType": "labels.icon", "stylers": { "visibility": "off" } }, { "featureType": "businesstowerlabel", "elementType": "labels", "stylers": { "visibility": "off" } }, { "featureType": "businesstowerlabel", "elementType": "labels.icon", "stylers": { "visibility": "off" } }, { "featureType": "companylabel", "elementType": "labels", "stylers": { "visibility": "off" } }, { "featureType": "companylabel", "elementType": "labels.icon", "stylers": { "visibility": "off" } }, { "featureType": "governmentlabel", "elementType": "labels", "stylers": { "visibility": "off" } }, { "featureType": "governmentlabel", "elementType": "labels.icon", "stylers": { "visibility": "off" } }, { "featureType": "restaurantlabel", "elementType": "labels", "stylers": { "visibility": "off" } }, { "featureType": "restaurantlabel", "elementType": "labels.icon", "stylers": { "visibility": "off" } }, { "featureType": "hotellabel", "elementType": "labels", "stylers": { "visibility": "off" } }, { "featureType": "hotellabel", "elementType": "labels.icon", "stylers": { "visibility": "off" } }, { "featureType": "shoppinglabel", "elementType": "labels", "stylers": { "visibility": "off" } }, { "featureType": "shoppinglabel", "elementType": "labels.icon", "stylers": { "visibility": "off" } }, { "featureType": "lifeservicelabel", "elementType": "labels", "stylers": { "visibility": "off" } }, { "featureType": "lifeservicelabel", "elementType": "labels.icon", "stylers": { "visibility": "off" } }, { "featureType": "carservicelabel", "elementType": "labels", "stylers": { "visibility": "off" } }, { "featureType": "carservicelabel", "elementType": "labels.icon", "stylers": { "visibility": "off" } }, { "featureType": "financelabel", "elementType": "labels", "stylers": { "visibility": "off" } }, { "featureType": "financelabel", "elementType": "labels.icon", "stylers": { "visibility": "off" } }, { "featureType": "otherlabel", "elementType": "labels", "stylers": { "visibility": "off" } }, { "featureType": "otherlabel", "elementType": "labels.icon", "stylers": { "visibility": "off" } }, { "featureType": "airportlabel", "elementType": "labels", "stylers": { "visibility": "on" } }, { "featureType": "airportlabel", "elementType": "labels.text.fill", "stylers": { "color": "#17263cff" } }, { "featureType": "airportlabel", "elementType": "labels.text.stroke", "stylers": { "color": "#17263cff" } }, { "featureType": "airportlabel", "elementType": "labels.icon", "stylers": { "visibility": "off" } }, { "featureType": "highway", "stylers": { "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "6" } }, { "featureType": "highway", "stylers": { "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "7" } }, { "featureType": "highway", "stylers": { "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "8" } }, { "featureType": "highway", "stylers": { "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "9" } }, { "featureType": "highway", "stylers": { "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "10" } }, { "featureType": "highway", "elementType": "geometry", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "6" } }, { "featureType": "highway", "elementType": "geometry", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "7" } }, { "featureType": "highway", "elementType": "geometry", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "8" } }, { "featureType": "highway", "elementType": "geometry", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "9" } }, { "featureType": "highway", "elementType": "geometry", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "10" } }, { "featureType": "nationalway", "stylers": { "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "6" } }, { "featureType": "nationalway", "stylers": { "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "7" } }, { "featureType": "nationalway", "stylers": { "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "8" } }, { "featureType": "nationalway", "stylers": { "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "9" } }, { "featureType": "nationalway", "stylers": { "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "10" } }, { "featureType": "nationalway", "elementType": "geometry", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "6" } }, { "featureType": "nationalway", "elementType": "geometry", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "7" } }, { "featureType": "nationalway", "elementType": "geometry", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "8" } }, { "featureType": "nationalway", "elementType": "geometry", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "9" } }, { "featureType": "nationalway", "elementType": "geometry", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "10" } }, { "featureType": "nationalway", "elementType": "labels", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "6" } }, { "featureType": "nationalway", "elementType": "labels", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "7" } }, { "featureType": "nationalway", "elementType": "labels", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "8" } }, { "featureType": "nationalway", "elementType": "labels", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "9" } }, { "featureType": "nationalway", "elementType": "labels", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "10" } }, { "featureType": "highway", "elementType": "labels", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "6" } }, { "featureType": "highway", "elementType": "labels", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "7" } }, { "featureType": "highway", "elementType": "labels", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "8" } }, { "featureType": "highway", "elementType": "labels", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "9" } }, { "featureType": "highway", "elementType": "labels", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "10" } }, { "featureType": "provincialway", "stylers": { "curZoomRegionId": "0", "curZoomRegion": "8,9", "level": "8" } }, { "featureType": "provincialway", "stylers": { "curZoomRegionId": "0", "curZoomRegion": "8,9", "level": "9" } }, { "featureType": "provincialway", "elementType": "geometry", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "8,9", "level": "8" } }, { "featureType": "provincialway", "elementType": "geometry", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "8,9", "level": "9" } }, { "featureType": "provincialway", "elementType": "labels", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "8,9", "level": "8" } }, { "featureType": "provincialway", "elementType": "labels", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "8,9", "level": "9" } }, { "featureType": "cityhighway", "stylers": { "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "6" } }, { "featureType": "cityhighway", "stylers": { "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "7" } }, { "featureType": "cityhighway", "stylers": { "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "8" } }, { "featureType": "cityhighway", "stylers": { "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "9" } }, { "featureType": "cityhighway", "stylers": { "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "10" } }, { "featureType": "cityhighway", "elementType": "geometry", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "6" } }, { "featureType": "cityhighway", "elementType": "geometry", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "7" } }, { "featureType": "cityhighway", "elementType": "geometry", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "8" } }, { "featureType": "cityhighway", "elementType": "geometry", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "9" } }, { "featureType": "cityhighway", "elementType": "geometry", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "10" } }, { "featureType": "cityhighway", "elementType": "labels", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "6" } }, { "featureType": "cityhighway", "elementType": "labels", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "7" } }, { "featureType": "cityhighway", "elementType": "labels", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "8" } }, { "featureType": "cityhighway", "elementType": "labels", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "9" } }, { "featureType": "cityhighway", "elementType": "labels", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "6,10", "level": "10" } }, { "featureType": "arterial", "stylers": { "curZoomRegionId": "0", "curZoomRegion": "9,10", "level": "9" } }, { "featureType": "arterial", "stylers": { "curZoomRegionId": "0", "curZoomRegion": "9,10", "level": "10" } }, { "featureType": "arterial", "elementType": "geometry", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "9,10", "level": "9" } }, { "featureType": "arterial", "elementType": "geometry", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "9,10", "level": "10" } }, { "featureType": "arterial", "elementType": "labels", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "9,10", "level": "9" } }, { "featureType": "arterial", "elementType": "labels", "stylers": { "visibility": "off", "curZoomRegionId": "0", "curZoomRegion": "9,10", "level": "10" } }, { "featureType": "building", "elementType": "geometry.fill", "stylers": { "color": "#0038dffa" } },{ "featureType": "building", "elementType": "geometry.topfill", "stylers": { "color": "#4a90e2fa" } }, { "featureType": "building", "elementType": "geometry.sidefill", "stylers": { "color": "#4a90e21a" } }, { "featureType": "building", "elementType": "geometry.stroke", "stylers": { "color": "#191a72fa" } }, { "featureType": "road", "elementType": "labels.text.fill", "stylers": { "color": "#759879ff" } }, { "featureType": "road", "elementType": "labels.text.stroke", "stylers": { "color": "#1a2e1cff" } }, { "featureType": "provincialway", "elementType": "labels.text.fill", "stylers": { "color": "#759879ff" } }, { "featureType": "cityhighway", "elementType": "labels.text.fill", "stylers": { "color": "#759879ff" } }, { "featureType": "arterial", "elementType": "labels.text.fill", "stylers": { "color": "#759879ff" } }, { "featureType": "provincialway", "elementType": "labels.text.stroke", "stylers": { "color": "#1a2e1cff" } }, { "featureType": "cityhighway", "elementType": "labels.text.stroke", "stylers": { "color": "#000590ff" } }, { "featureType": "arterial", "elementType": "labels.text.stroke", "stylers": { "color": "#000590ff" } }, { "featureType": "local", "elementType": "labels", "stylers": { "visibility": "off" } }, { "featureType": "manmade", "elementType": "labels.text.fill", "stylers": { "color": "#ffffff26" } }, { "featureType": "manmade", "elementType": "labels.text.stroke", "stylers": { "color": "#0034beff" } }, { "featureType": "subwaystation", "elementType": "geometry", "stylers": { "visibility": "off" } }, { "featureType": "education", "elementType": "geometry", "stylers": { "visibility": "off" } }, { "featureType": "education", "elementType": "labels.text.fill", "stylers": { "color": "#ffffff26", "weight": 10 } }, { "featureType": "education", "elementType": "labels.text.stroke", "stylers": { "color": "#00139dff" } },{ "featureType": "transportationlabel", "elementType": "labels.icon", "stylers": { "visibility": "off" } }, { "featureType": "medical", "elementType": "labels", "stylers": { "visibility": "off" } }, { "featureType": "medical", "elementType": "geometry", "stylers": { "visibility": "off" } },{ "featureType": "transportationlabel", "elementType": "labels", "stylers": { "visibility": "off" } }, { "featureType": "scenicspots", "elementType": "geometry", "stylers": { "visibility": "off" } }, { "featureType": "scenicspots", "elementType": "labels", "stylers": { "visibility": "off" } }, { "featureType": "highway", "elementType": "geometry.fill", "stylers": { "color": "#276df7ff" } }, { "featureType": "highway", "elementType": "geometry.stroke", "stylers": { "color": "#00048cff", "weight": 10 } },{ "featureType": "estate", "elementType": "geometry", "stylers": { "color": "#2a3341ff" } },{ "featureType": "arterial", "elementType": "geometry.fill", "stylers": { "color": "#276df7ff" } }, { "featureType": "arterial", "elementType": "geometry.stroke", "stylers": { "color": "#00048cff", "weight": 10 } }, { "featureType": "local", "elementType": "geometry.fill", "stylers": { "color": "#276df7ff" } }, { "featureType": "local", "elementType": "geometry.stroke", "stylers": { "color": "#000265ff", "weight": 10 } }, { "featureType": "railway", "elementType": "geometry", "stylers": { "visibility": "off" } }, { "featureType": "subway", "elementType": "geometry", "stylers": { "visibility": "off" } }, { "featureType": "highway", "elementType": "labels.text.fill", "stylers": { "color": "#276df7ff", "weight": 10 } }, { "featureType": "highway", "elementType": "labels.text.stroke", "stylers": { "color": "#000a55ff" } }, { "featureType": "arterial", "elementType": "labels.text.fill", "stylers": { "color": "#276df7ff", "weight": 10 } }, { "featureType": "arterial", "elementType": "labels.text.stroke", "stylers": { "color": "#ffffff1a" } }, { "featureType": "arterial", "elementType": "labels.icon", "stylers": { "visibility": "off" } }, { "featureType": "local", "elementType": "labels.text.fill", "stylers": { "color": "#276df7ff", "weight": 10 } }, { "featureType": "local", "elementType": "labels.text.stroke", "stylers": { "color": "#0008bb87" } }, { "featureType": "local", "elementType": "labels.icon", "stylers": { "visibility": "off" } }, { "featureType": "airportlabel", "elementType": "labels", "stylers": { "visibility": "off" } }, { "featureType": "airportlabel", "elementType": "labels.icon", "stylers": { "visibility": "off" } }, { "featureType": "scenicspotslabel", "elementType": "labels", "stylers": { "visibility": "off" } }, { "featureType": "scenicspotslabel", "elementType": "labels.icon", "stylers": { "visibility": "off" } }, { "featureType": "educationlabel", "elementType": "labels.text.fill", "stylers": { "color": "#4a90e240" } }, { "featureType": "educationlabel", "elementType": "labels.icon", "stylers": { "visibility": "off" } }, { "featureType": "educationlabel", "elementType": "labels.text.stroke", "stylers": { "color": "#ffffff0" } }, { "featureType": "medicallabel", "elementType": "labels", "stylers": { "visibility": "off" } }, { "featureType": "medicallabel", "elementType": "labels.icon", "stylers": { "visibility": "off" } }, { "featureType": "poilabel", "elementType": "labels", "stylers": { "visibility": "off" } }, { "featureType": "poilabel", "elementType": "labels.icon", "stylers": {} }, { "featureType": "continent", "elementType": "labels.text.fill", "stylers": { "color": "#000a55ff" } }, { "featureType": "continent", "elementType": "labels.text.stroke", "stylers": { "color": "#ffffffff" } }, { "featureType": "city", "elementType": "labels.text.fill", "stylers": { "color": "#4a90e280" } }, { "featureType": "city", "elementType": "labels.text.stroke", "stylers": { "color": "#ffffff1a" } }, { "featureType": "city", "elementType": "labels.icon", "stylers": { "visibility": "off" } }, { "featureType": "district", "elementType": "labels", "stylers": { "visibility": "off" } }, { "featureType": "town", "elementType": "labels.text.fill", "stylers": { "color": "#4a90e280" } }, { "featureType": "town", "elementType": "labels.text.stroke", "stylers": { "color": "#000a55ff" } }, { "featureType": "educationlabel", "elementType": "labels.text", "stylers": { "visibility": "off" } }, { "featureType": "educationlabel", "elementType": "labels", "stylers": { "visibility": "off" } }, { "featureType": "education", "elementType": "labels", "stylers": { "visibility": "off" } }];
使用方法如下
var that = this; var mapDom = document.getElementsByClassName("map")[0]; mapDom.style.height = (mapDom.clientWidth / 1228 * 1940) + "px"; var map = that.bMap = new BMapGL.Map(that.$refs.bMap, { enableMapClick: false }); map.enableScrollWheelZoom(true); map.setMapStyleV2({styleJson: baiduMapStyle});
如需自行调整也可以使用百度官方的皮肤编辑器进行逐个修改
参考资料