颜色“感兴趣区域”在Google Maps API上? [英] Color "areas of interest" on Google Maps API?
问题描述
现在,这里没有太多的技术信息。有没有人已经发现在哪里可以改变那些浅褐色/橙色 - 感兴趣区域的颜色? b从测试这里(并且这个链接在他们的开发站点上),唯一对它做任何事的是
all
,更具体的可以使用特征类型:全部元素类型:geometry.fill
要真正'隐藏'感兴趣的区域:首先在全部
几何图形上设置颜色,并通过指定水,公园,道路等的颜色来覆盖该设置。
代码示例:
var myStyle = [
{featureType:all,elementType:geometry.fill,stylers:[{color:#CCCCCC}]},
{featureType:water,elementType:geometry,stylers:[{色调:#99CCFF},{亮度:30},{饱和度:50}]},
{featureType:road,elementType:geometry,stylers:[{color:#eeeeee} ,{lightness:30},{visibility:simplified}]},
{featureType:landscape.natural,elementType:geometry,stylers:[{color:#c4d7cd}]},
{featureType:poi.park,elementType:geometry,stylers:[{color:#b4d9c6}]},
];
Google has just changed the maps colors scheme and it has messed up the custom colors on a site I'm working on. This is the news from their blog:
Discover the action around you with the updated Google Maps
Now, not much technical info there. Has anyone already found out where to change that light brown/orange-ish color for "areas of interest"?
From testing here (and this link is on their dev site), the only thing that does anything to it is all
, and the more specific you can go is with Feature type: all Element type: geometry.fill
To really 'hide' the areas of interest: first set a color on all
geometries, and than override that setting by specifying the colors for water, parks, roads et cetera.
Code sample:
var myStyle = [
{featureType: "all", elementType: "geometry.fill", stylers: [{color: "#CCCCCC"}]},
{featureType: "water", elementType: "geometry", stylers: [{hue: "#99CCFF"}, {lightness: 30}, {saturation: 50}]},
{featureType: "road", elementType: "geometry", stylers: [{color: "#eeeeee"},{lightness: 30},{visibility: "simplified"}]},
{featureType: "landscape.natural", elementType: "geometry", stylers: [{color: "#c4d7cd"}]},
{featureType: "poi.park", elementType: "geometry", stylers: [{color: "#b4d9c6"}]},
];
这篇关于颜色“感兴趣区域”在Google Maps API上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!