Google Maps V3-是否编辑缺陷? [英] Google Maps V3 - Editing Flaw or Not?

查看:74
本文介绍了Google Maps V3-是否编辑缺陷?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

他所有人!

就是想?我允许Web应用程序的用户使用自己的多边形,折线和标记来创建地图. (使用Google Maps API 3).

一切似乎都正常.但是,我的一位用户指出,如果他们在地图上绘制多边形并继续绘制标准标记和/或折线,那么如果您在多边形填充区域的顶部单击,单击事件不会放置标记?

有办法克服吗?我试图找到答案,但是似乎没有太多人需要这种复杂的地图编辑.

He all!

Just wondering? I allow users of my web application to create a map with their own polygons, polylines and markers. (Using Google Maps API 3).

Everything seems to work just fine. However, one of my users pointed out that if they draw a polygon on the map and proceed to draw a standard marker and/or polyline, the click event does not place a marker if you click on top of a polygon fill area?

Is there a way to overcome this? I''ve tried to find the answer, but it seems not too many people require this complex map editing.

Greetings!

推荐答案

解决了!

向折线和面属性添加了一个简单的选项:
之前:
Solved!

One simple option added to polyline and polygon properties:
Before:
var polyOptions = {
                    strokeColor: polylineColor,
                    strokeOpacity: polyLineOpacity,
                    strokeWeight: polyLineWidth
                }


之后:


After:

var polyOptions = {
                   strokeColor: polylineColor,
                   strokeOpacity: polyLineOpacity,
                   strokeWeight: polyLineWidth,
                   clickable: false
               }



简单的问题的简单解决方案!
享受吧!



Simple solution to a simple prob!
Enjoy!


这篇关于Google Maps V3-是否编辑缺陷?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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