Hi All,
After upgrading the ionic2 to beta3, the google map is showing blank when i run in Android. It works fine on browser.
I have added meta tag but it doesn’t work.
<meta http-equiv="Content-Security-Policy" content="default-src *; script-src 'self' 'unsafe-inline' 'unsafe-eval' *; style-src 'self' 'unsafe-inline' *">
also
<script src="http://maps.google.com/maps/api/js"></script>
Below is my code
constructor() {
this.map = null;
this.loadMap();
}
loadMap(){
let options = {timeout: 10000, enableHighAccuracy: true};
navigator.geolocation.getCurrentPosition(
(position) => {
let latLng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
let mapOptions = {
center: latLng,
zoom: 15,
mapTypeId: google.maps.MapTypeId.ROADMAP
}
this.map = new google.maps.Map(document.getElementById("map_canvas"), mapOptions);
},
(error) => {
console.log(error);
}, options
);
}
Please help.
Cheers,