経度からデータを取得できません。静的に動作しますが、変数currentLatLng.longitutde
を使用すると、null
となります。 これは私のコードです:位置座標から経度を取得
var currentLatLng = position.coords;
var latlon = "Latitude" + currentLatLng.latitude + ","
+ "Longitude" + currentLatLng.longitutde;
var mappOptions = {
center: new google.maps.LatLng(currentLatLng.latitude,
currentLatLng.longitutde),
//center: new google.maps.LatLng(currentLatLng.latitude, 10.181531600000001),
zoom: 15,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var DirectionsService = new google.maps.DirectionsService;
var directionsDisplay = new google.maps.DirectionsRenderer;
var geocoder = new google.maps.Geocoder;
var map = new google.maps.Map(document.getElementById("map"), mappOptions);
directionsDisplay.setMap(map);
おかげで仲間をlongitutdeない、それは経度ですオートコンプリートから注意を保つ...はい私は –
は、私はあなたがSOに新しいユーザーであることを見ていることがわかりません。答えがあなたの問題を解決したら、それを合格とマークしてください。ありがとう。 – imerso