var spotlat = document.getElementById("lat0").innerHTML;
var spotlng = document.getElementById("lng0").innerHTML;
erspot = new google.maps.Marker({
position: new google.maps.LatLng(spotlat,spotlng),
map: map,
icon: image
});
position无法得到坐标
但是换成具体数据就可以了
请问有没有大牛能够指导下?
var spotlng = document.getElementById("lng0").innerHTML;
erspot = new google.maps.Marker({
position: new google.maps.LatLng(spotlat,spotlng),
map: map,
icon: image
});
position无法得到坐标
但是换成具体数据就可以了
请问有没有大牛能够指导下?
var spotlng = parseFloat(document.getElementById("lng0").innerHTML);erspot = new google.maps.Marker({
position: new google.maps.LatLng(spotlat,spotlng),
map: map,
icon: image
});
用alert看position 至少显示的正确