简体   繁体   English

使用Google Maps API v3的overlayMouseTarget

[英]overlayMouseTarget with google maps api v3

I've been breaking my head for a bout 6 hours now trying to get a link to work on google maps api v3. 我一直在努力奋斗6个小时,现在试图获取一个可在google maps api v3上使用的链接。 I understand that I must use overlayMouseTarget in order for the ios device to work. 我了解我必须使用overlayMouseTarget才能使ios设备正常工作。

Here is a sample page: http://spartanpixel.com/dev/OfficeLocator/stackoverflow.html it works as a webApp. 这是一个示例页面: http ://spartanpixel.com/dev/OfficeLocator/stackoverflow.html它可以作为webApp使用。

I do not know where to put overlayMouseTarget in order for my click to register, as I have it now it works on chrome but not Firefox :/ What I'm trying to do is, when some one taps/clicks on the location icon above the footer, the map will take you to your location. 我不知道将overlayMouseTarget放置在哪里以进行点击注册,因为我现在拥有它,它可以在chrome上运行,但不能在Firefox上运行:/我想做的是,当有人点击/单击上面的位置图标时页脚,地图将带您到您的位置。

I can geolocate you just fine, is just that it won't let you click it. 我可以对您进行地理定位,只是它不会让您单击它。 I'm using jQuery Mobile. 我正在使用jQuery Mobile。

Thanks in advance. 提前致谢。

Maybe that was an api BUG reported in last year. 也许这是去年报告的api错误。 I had similar problem and I solved it using: 我有类似的问题,我用以下方法解决了:

pane.overlayMouseTarget.appendChild(element);

instead of 代替

pane.overlayLayer.appendChild(element);

check this http://code.google.com/p/gmaps-api-issues/issues/detail?id=3719 检查此http://code.google.com/p/gmaps-api-issues/issues/detail?id=3719

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM