gpt4 book ai didi

javascript - 是否可以使用 JS 或 CSS 从谷歌地图中删除地标?

转载 作者:太空宇宙 更新时间:2023-11-04 03:23:32 24 4
gpt4 key购买 nike

我有一个问题,是否可以从谷歌地图中删除所有地标,这样我就可以在不显示地标的情况下更改 map 的比例?

最佳答案

将以下样式输入您的 map - 样式:[{"stylers":[{"visibility":"off"}]},{"featureType":"road","stylers":[{"visibility":"on"},{"color":"#ffffff"}]},{"featureType":"road.arterial","stylers":[{"visibility":"on"},{"color ":"#fee379"}]},{"featureType":"road.highway","stylers":[{"visibility":"on"},{"color":"#fee379"}]},{ "featureType":"landscape","stylers":[{"visibility":"on"},{"color":"#f3f4f4"}]},{"featureType":"water","stylers":[ {“visibility”:“on”},{“color”:“#7fc8ed”}]},{},{},{“featureType”:“road”,“elementType”:“labels”,“stylers”:[{“visibility":"off"}]},{"featureType":"poi.park","elementType":"geometry.fill","stylers":[{"visibility":"on"},{"color":"#83cead"}]},{"elementType":"labels","stylers":[{"visibility":"off"}]},{"featureType":"landscape.man_made","elementType": "geometry","stylers":[{"weight":0.9},{"visibility":"off"}]}] 在 mapOptions 数组中。当您向您的谷歌地图提供此 map 选项时,将不会有任何标记。

关于javascript - 是否可以使用 JS 或 CSS 从谷歌地图中删除地标?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27503555/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com