检测谷歌地图标记是否放置在路线上 [英] Detect if google map marker is placed on route

查看:58
本文介绍了检测谷歌地图标记是否放置在路线上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以检测标记是否放置在我使用Google Maps API V3创建的路线中间? 看看 isLocationOnEdge - 方法#polyrel =nofollow> google.maps.geometry.poly



注意:默认情况下,几何库不会被加载,您必须通过将maps-parameter添加到maps-API-script-url来加载库: & libraries = geometry


Is it possible to detect if a marker is placed in the middle of a route I made using Google Maps API V3?

解决方案

Take a look at the isLocationOnEdge-method of google.maps.geometry.poly

Note: the geometry-library isn't loaded by default, you must load the library by adding the libraries-parameter to the maps-API-script-url: &libraries=geometry

这篇关于检测谷歌地图标记是否放置在路线上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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