I'm developping a Phonegap application with Ionic Framework and AngularJS, i have to put two maps, in different pages. I get this a blank window
In app.js
.run(function () {
ionic.Platform.ready(function () {
var div = document.getElementById("map_canvas1");
alert('deviceready');
alert(window.plugin);
// map = window.plugin.google.maps.Map.getMap(div);
if (window.plugin) {
alert(1);
map = window.plugin.google.maps.Map.getMap(div);
}
});
})
My html page
<div class="modal">
<ion-header-bar class="bar-positive">
<button menu-toggle="right" class="button button-icon icon ion-navicon"></button>
<h1 class="title">Géolocalisation</h1>
</ion-header-bar>
<ion-content>
<div style="width:90%;margin-left:10%;height:500px" id="map_canvas1"></div>
</ion-content>
</div>
I get this error in logcat
11-11 17:33:38.823: E/GooglePlayServicesUtil(10062): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
11-11 17:33:40.367: E/GooglePlayServicesUtil(10062): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
11-11 17:33:40.732: E/NativeCrypto(10062): ssl=0x53d54c10 cert_verify_callback x509_store_ctx=0x57b8dae8 arg=0x0
11-11 17:33:40.732: E/NativeCrypto(10062): ssl=0x53d54c10 cert_verify_callback calling verifyCertificateChain authMethod=ECDHE_ECDSA
Thank you for using my plugin. I'm not familiar with the ionic framework though, many people use with it. So it should work.
Unfortunately, the map plugin does not support multiple maps. So you need to map.remove(), then Map.getMap() again.
Many people asks regarding of ionic on the issue list. You might find helpful information. https://github.com/wf9a5m75/phonegap-googlemaps-plugin/search?q=ionic&type=Issues&utf8=%E2%9C%93
Also the forum page of the ionic framework might help for your issue. http://forum.ionicframework.com/t/using-google-maps-cordova-plugin/4456