您好我创建了一个mashup,用户可以在其中输入位置。使用IE7时,几乎所有位置都可以进行地理编码,但不能与其他浏览器一起使用......您认为这里的问题是什么,或者是否有修复为此?我使用javascript地理编码,如:
function addToMap(response) {
var x="Fa, France";
// Retrieve the object
if (x.length > 0 && x != "") {
if (!response || response.Status.code != 200) {
alert("Please enter a valid location.I cannot geocode it!");
}
else
{
place = response.Placemark[0];
// Retrieve the latitude and longitude
point = new GLatLng(place.Point.coordinates[1],
place.Point.coordinates[0]);
// Center the map on this point
map.setCenter(point, 4);}}
...更多代码
答案 0 :(得分:1)
在最新版本的API中,有必要使用Numbers作为GLatLng()的参数。在以前的版本中,您可以像往常一样将它们保留为String对象。
尝试使用parseFloat(place.Point.coordinates [1]),parseFloat(place.Point.coordinates [0])
我不知道为什么MSIE7会有任何不同,或者为什么你没有在Firebug中收到明确的错误信息。也许有些东西你没告诉我们。