Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用 Google Maps API v3 在我的地图中添加了一些 Maker。它们由 LAT 和 LONG 坐标定位,并显示默认标记(A、B、C)。
但现在我想为每个标记显示另一个标记从默认制造商移位(或移动)几个像素,如下图所示:
正方形必须是一个小 div 彩色。
我必须如何编写新的标记?
不能从 DOM 元素(例如 div)创建标记。
您必须创建自定义叠加层
MarkerWithLabel应该是实现它的一个不错的选择。