我与使用者GeoCode检测的路线&之间存在冲突。如何制作Google Maps V3路线使用用户位置检测 - GeoCoder
如果我这样做:
var MapCenter = new google.maps.LatLng(-33.8665433, 151.1956316);
function initialize(lat,lng) {
geocoder = new google.maps.Geocoder();
// var MapCenter = new google.maps.LatLng(lat,lng);
geocodeThis(MapCenter);
方向做工精细,但地理编码器并没有得到用户的位置。
如果我不喜欢这样写道:
// var MapCenter = new google.maps.LatLng(-33.8665433, 151.1956316);
function initialize(lat,lng) {
geocoder = new google.maps.Geocoder();
var MapCenter = new google.maps.LatLng(lat,lng);
geocodeThis(MapCenter);
地理编码器获取用户的位置,但是当你点击信息窗口,然后在方向上,该脚本不会做任何事情。相反,它应该为您提供从当前(仅GeoCoded)位置到该标记的路线。
这是我的full code。
不要把“尚未解决”的标题。只要没有被接受的答案,我们知道它没有解决。 – simchona
“不起作用”不是问题描述。 –
我改写了这个问题,@Lightness在轨道竞赛 – Sebastian