我在我的一个离子页面上有一个谷歌地图。这张地图显示了一个人的住所,我正在使用地理编码器在我的谷歌地图上查看此地址。
在Android上这很好用,但在iOS上我的地图是空白的(白页)。
我认为问题在于,由于某种原因,地图没有设置位置,因此没有正确呈现地图。
这段代码用于地址:
geocoder.geocode({'address': $stateParams.location}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
console.log(results);
start = results[0].geometry.location;
map.setCenter(start);
var marker = maps.createMarker(map, results[0].geometry.location, redMarker);
} else {
console.log("Geocode was not successful for the following reason: " + status);
}
});
结果在iOS上为空([]),但在Android上它充满了正确的信息。
有人可以帮我这个吗?
答案 0 :(得分:-1)
您必须看到错误被返回给IOS。我猜它与Cross Website Scripting有关。