[英]Google Map API V3: How to disable vegetation?
While everyone is trying to add better vegetation image to google map, I need a clean geography without any vegetation and terrain information on it, which was done by API V2 当每个人都在尝试向Google地图添加更好的植被图像时,我需要一个干净的地理环境,上面没有任何植被和地形信息,这是由API V2完成的
Currently I have javascript: 目前,我有javascript:
var styles = [
{
featureType: "all",
stylers: [
{ saturation: -80 }
]
},{
featureType: "road.arterial",
elementType: "geometry",
stylers: [
{ hue: "#00ffee" },
{ saturation: 50 }
]
},{
featureType: "poi.business",
elementType: "labels",
stylers: [
{ visibility: "off" }
]
}
];
var mapOptions = {
center: new google.maps.LatLng(37.774546, -122.4335235),
zoom: 3,
styles: styles
};
This can return me a gray color image, but it still has vegetation and terrain on it. 这可以为我返回灰色图像,但是上面仍然有植被和地形。 I failed to find a style type or anything else related to my problem.
我找不到样式类型或与我的问题有关的其他任何内容。 Can anyone help me out?
谁能帮我吗?
JSON (put it in your styles
array): JSON(将其放入
styles
数组中):
{
"featureType": "landscape.natural.terrain",
"stylers": [
{ "visibility": "off" }
]
},{
"featureType": "landscape.natural.landcover",
"stylers": [
{ "visibility": "off" }
]
},{
"featureType": "poi.park",
"stylers": [
{ "visibility": "off" }
]
},{
"featureType": "water",
"stylers": [
{ "visibility": "off" }
]
}
Completely removes: 完全删除:
Before (default style): 之前(默认样式):
After (custom style): 之后(自定义样式):
Since 2012, the default google map tiles have included terrain and vegetation: 自2012年以来,默认的Google地图图块已包含地形和植被:
Google Maps now clearly shows terrain, color gradations to depict vegetation, and labels for natural land formations
Google地图现在可以清楚地显示地形,颜色等级以描述植被以及自然土地形成的标签
source: http://google-latlong.blogspot.com/2012/10/get-better-view-of-natural-geography.html
来源: http : //google-latlong.blogspot.com/2012/10/get-better-view-of-natural-geography.html
As far as I know there there is no more basic map view than this. 据我所知,没有比这更多的基本地图视图了。 You can try OpenStreetMap tiles instead.
您可以尝试使用OpenStreetMap切片。 OSM tiles provided by CloudMade , for example, have fairly basic styling.
例如,由CloudMade提供的OSM磁贴具有相当基本的样式。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.