How do you style or completely remove the Google map road direction arrows ?
如何设置或完全删除Google地图道路方向箭头?
Here is my styles array :
这是我的样式数组:
styles:[
{
"featureType": "all",
"elementType": "all",
"stylers": [
{
"visibility": "simplified"
}
]
},
{
"featureType": "all",
"elementType": "labels",
"stylers": [
{
"visibility": "on"
},
{
"lightness": "-20"
}
]
},
{
"featureType": "all",
"elementType": "labels.text",
"stylers": [
{
"weight": "0.38"
}
]
},
{
"featureType": "all",
"elementType": "labels.text.fill",
"stylers": [
{
"saturation": 36
},
{
"color": "#b2a77f"
},
{
"lightness": 40
}
]
},
{
"featureType": "all",
"elementType": "labels.text.stroke",
"stylers": [
{
"visibility": "on"
},
{
"color": "#383838"
},
{
"lightness": 16
}
]
},
{
"featureType": "all",
"elementType": "labels.icon",
"stylers": [
{
"visibility": "off"
}
]
},
{
"featureType": "administrative",
"elementType": "geometry.fill",
"stylers": [
{
"color": "#000000"
},
{
"lightness": 20
}
]
},
{
"featureType": "administrative",
"elementType": "geometry.stroke",
"stylers": [
{
"color": "#000000"
},
{
"lightness": 17
},
{
"weight": 1.2
}
]
},
{
"featureType": "landscape",
"elementType": "geometry",
"stylers": [
{
"color": "#383838"
},
{
"lightness": "0"
}
]
},
{
"featureType": "landscape",
"elementType": "labels.text",
"stylers": [
{
"visibility": "simplified"
}
]
},
{
"featureType": "landscape.man_made",
"elementType": "all",
"stylers": [
{
"visibility": "on"
}
]
},
{
"featureType": "poi",
"elementType": "geometry",
"stylers": [
{
"color": "#000000"
},
{
"lightness": 21
}
]
},
{
"featureType": "road",
"elementType": "labels.text",
"stylers": [
{
"visibility": "simplified"
}
]
},
{
"featureType": "road.highway",
"elementType": "geometry.fill",
"stylers": [
{
"color": "#000000"
},
{
"lightness": 17
}
]
},
{
"featureType": "road.highway",
"elementType": "geometry.stroke",
"stylers": [
{
"color": "#000000"
},
{
"lightness": 29
},
{
"weight": 0.2
}
]
},
{
"featureType": "road.highway",
"elementType": "labels.text",
"stylers": [
{
"visibility": "simplified"
}
]
},
{
"featureType": "road.arterial",
"elementType": "geometry",
"stylers": [
{
"color": "#000000"
},
{
"lightness": 18
}
]
},
{
"featureType": "road.arterial",
"elementType": "labels.text",
"stylers": [
{
"visibility": "off"
}
]
},
{
"featureType": "road.local",
"elementType": "geometry",
"stylers": [
{
"color": "#000000"
},
{
"lightness": 16
}
]
},
{
"featureType": "transit",
"elementType": "geometry",
"stylers": [
{
"color": "#000000"
},
{
"lightness": 19
}
]
},
{
"featureType": "water",
"elementType": "geometry",
"stylers": [
{
"lightness": 17
},
{
"color": "#5f5b4b"
}
]
},
{
"featureType": "water",
"elementType": "labels.text",
"stylers": [
{
"visibility": "off"
}
]
},
{
"featureType": "water",
"elementType": "labels.text.fill",
"stylers": [
{
"visibility": "off"
}
]
},
{
"featureType": "water",
"elementType": "labels.icon",
"stylers": [
{
"visibility": "off"
}
]
}
]
and I have tried the following :
我尝试过以下方法:
disableDefaultUI: true,
streetViewControl: false,
scrollwheel: true,
panControl: false,
mapTypeControl: false,
overviewMapControl: false,
zoomControl: false,
draggable: true
Unfortunately the arrows do not disappear
不幸的是箭头并没有消失
Is it possible to do so ?
有可能这样做吗?
Thanks!
谢谢!
3 个解决方案
#1
7
Google Maps has now been updated to allow for the removal of the road direction arrows by setting the visibility of the labels.icon
element.
Google地图现已更新,允许通过设置labels.icon元素的可见性来删除道路方向箭头。
{
"featureType": "road",
"elementType": "labels.icon",
"stylers": [
{"visibility": "off"}
]
}
Reference: issue ticket
参考:发行票
#2
6
I did a request. remove the litte arrows on the road https://code.google.com/p/gmaps-api-issues/issues/detail?id=7884
我做了一个请求。删除道路上的小箭头https://code.google.com/p/gmaps-api-issues/issues/detail?id=7884
#3
3
Seems like there are no way to disable the arrow at all.
似乎根本没有办法禁用箭头。
I tried to turn off everything in the Google Maps API Styled Map Wizard, however, sadly the arrows are still here...
我试图关闭Google Maps API样式化地图向导中的所有内容,但遗憾的是箭头仍然在这里......
Since the arrow is transparent and darken its area, one work around is to set the lightless to -100 so everything become black. One draw back on this is the maps become so ugly :p
由于箭头是透明的并且使其区域变暗,因此一种解决方法是将无光线设置为-100,因此一切都变黑。对此的一个缺点是地图变得如此丑陋:p
#1
7
Google Maps has now been updated to allow for the removal of the road direction arrows by setting the visibility of the labels.icon
element.
Google地图现已更新,允许通过设置labels.icon元素的可见性来删除道路方向箭头。
{
"featureType": "road",
"elementType": "labels.icon",
"stylers": [
{"visibility": "off"}
]
}
Reference: issue ticket
参考:发行票
#2
6
I did a request. remove the litte arrows on the road https://code.google.com/p/gmaps-api-issues/issues/detail?id=7884
我做了一个请求。删除道路上的小箭头https://code.google.com/p/gmaps-api-issues/issues/detail?id=7884
#3
3
Seems like there are no way to disable the arrow at all.
似乎根本没有办法禁用箭头。
I tried to turn off everything in the Google Maps API Styled Map Wizard, however, sadly the arrows are still here...
我试图关闭Google Maps API样式化地图向导中的所有内容,但遗憾的是箭头仍然在这里......
Since the arrow is transparent and darken its area, one work around is to set the lightless to -100 so everything become black. One draw back on this is the maps become so ugly :p
由于箭头是透明的并且使其区域变暗,因此一种解决方法是将无光线设置为-100,因此一切都变黑。对此的一个缺点是地图变得如此丑陋:p