我與使用者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