任何人都可以看到以下问题我希望它是一个简单的障碍,但它让我疯了......
firebug提出'失踪:财产后身份' - 我已经在网上看了但是不能理解它任何想法..?
navigator.geolocation.getCurrentPosition(function(position){
var lat = position.coords.latitude;
var lon = position.coords.longitude;
var request = {
request.origin = position.coords.latitude + ',' + position.coords.longitude;,
travelMode: google.maps.DirectionsTravelMode.DRIVING
};
});
},function(error){
//use error.code to determine what went wrong
});
答案 0 :(得分:2)
var request = {
request.origin = position.coords.latitude + ',' + position.coords.longitude;,
travelMode: google.maps.DirectionsTravelMode.DRIVING
};
应该
// notice the "origin:"
var request = {
origin: position.coords.latitude + ',' + position.coords.longitude,
travelMode: google.maps.DirectionsTravelMode.DRIVING
};