如何将Google地图标签放在首位? [英] How to put Google Map labels on top?

查看:126
本文介绍了如何将Google地图标签放在首位?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用谷歌地图中的折线。基本上我正在尝试使用折线在几条道路上画一条线。

I am working with polylines in google map. Basically i am trying to draw a line on several roads using polyline.

现在这些折线阻塞(在顶部)道路标签。我已经更改了不透明度级别以便更好地查看,但我真的想要Google地图标签。

Now those polylines are blocking(on top) road labels. I have changed the opacity level for better viewing but i really want Google map labels on top.

我已经研究了样式图,但我还没有找到任何合适的解决方案。有办法吗?

I have studied styling maps, but i havent found any suitable solutions. Is there a way to do it?

提前致谢。

推荐答案

瓷砖(包含地面,标签,街道等) 。)作为单个图像而不是图层提供,因此无法在图块中显示的特定要素之间放置任何内容。

The tiles(which contain the ground, label, streets etc. ) are delivered as single images, not as layers, so there is no way to put anything between particular features that are shown in the tiles.

但可能有方法。

假设您有2个(同步)地图,1个完整地图和1个地图,您只显示标签。

Let's assume you have 2 (synchronized) maps, 1 complete map and 1 map where you only display the labels.

当您将带有标签的地图放在另一张地图的顶部时,它将能够获得所需的效果(这并不意味着我会建议它,我只是想避免说不可能) )

When you place the map with the labels on top of the other map it would be able to get the desired effect(which does not mean that I would suggest to it it, I just like to avoid to say "impossible")

演示: <强> http://jsfiddle.net/cs9M6/

这篇关于如何将Google地图标签放在首位?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆