Hello,
I am trying to use google maps with the last version of framework7.
I made it works before, in v1, by loading the map in the onPageAfterAnimation event.
I can see that now there is no more onPageAfterAnimation event with vue.
So I tried to use the @page:init but I got an error when the page load. If after the load, I re-execute the code for google map (in the console debugger), it works perfectly.
How should I load the Map then?
Information
I got the javascript error:
[ignore]map_0_42126566231.resizeMap, because removed.commandQueueExecutor.js:32
<f7-page :page-content="false" @page:init="onPageInit">
...
<div style="height:100%;width:100%; position:relative" id="map_canvas"></div>
...
<script>
export default {
data() {
return {
}
},
methods: {
onMap_Init(newMap) {
console.log("Done");
/* newMap.setOptions({
controls: {
'myLocationButton': true
}
});*/
},
onPageInit() {
var div = document.getElementById("map_canvas");
var myMap = plugin.google.maps.Map.getMap(div, {
controls: {
myLocationButton: true
},
gestures: {
'scroll': true,
'tilt': true,
'rotate': true,
'zoom': true
}
});
myMap.on(plugin.google.maps.event.MAP_READY, this.onMap_Init);
}
},
};
</script>