Maps API-街道上的标记 [英] Maps API - Marker on the street
本文介绍了Maps API-街道上的标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Maps API中,是否可以将标记捕捉到街道上?通常,如果要按地址设置标记(而不是latlng),则标记设置在建筑物内的某个位置.就我而言,如果您有一个有几家商店的大型购物中心.我希望在大街上设置标记.
In Maps API, is there a way to snap markers to the street? Normally, if you want to set a marker by address (not latlng), the marker is set somewhere inside the building. In my case, this is an issue if you have e.g. a large mall with several shops. I'd prefer to set a marker on the street.
我正在使用Maps API v3.
I'm using Maps API v3.
非常感谢!
推荐答案
使用路线服务.到/来自同一位置的请求路线应该在距离该位置最近的道路上.
Use the directions service. Request directions to/from the same location, should be on the road closest to the location.
请参阅相关问题:Google Maps api-将标记捕捉到最近的道路
这篇关于Maps API-街道上的标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文