我正在使用 Cordova、AngularJs 和 OnsenUI 开发一款应用程序,
我正在使用 Google Maps Api 显示我当前的位置和大约 200 个其他位置标记,
谷歌地图在所有其他设备上工作正常,但当我仅使用 Iphone X 放大 IOS-11.3 时,应用程序崩溃,
科尔多瓦:6.5.0
AngularJs 1
npm:2.14.0
我添加了 firebase 崩溃报告插件,它报告了 OOM(内存不足)崩溃报告,
标记图像大小仅为 1kb,大约有 200 个标记。
这是我的代码
var mapProp = {
center: new google.maps.LatLng(userlocation.latitude, userlocation.longitude),
zoom: 12,
mapTypeId: google.maps.MapTypeId.ROADMAP,
disableDefaultUI: true,
MapOptions: {
zoomControl: false,
mapTypeControl: false,
scaleControl: false,
streetViewControl: false,
rotateControl: false,
fullscreenControl: false
}
};
var map = new google.maps.Map(document.getElementById("mapNearByBreweries"), mapProp);
var usermarker = new google.maps.Marker({
position: new google.maps.LatLng(userlocation.latitude, userlocation.longitude),
icon: {
path: google.maps.SymbolPath.CIRCLE,
scale: 7,
strokeColor: "#0000FF",
},
draggable: false,
map: map
});
for (var i = 0; i < breweries.length; i++) {
marker = new google.maps.Marker({
position: new google.maps.LatLng(breweries[i].Latitude, breweries[i].Longitude),
map: map,
icon: 'images/blue-dot.png'
//animation: google.maps.Animation.BOUNCE
});
那么,ios 11.3(IphoneX) 中的哪些新功能会导致 google 地图 api 缩放时内存不足?
我能做些什么来解决这个问题?