I'm developing mobile application based on Cordova with main purpose of displaying and picking location from Google maps. Application is designed to be Page like, so every page has 100% height & width and navigation buttons Next & Back. Every page should have map inside, but this is problem, becouse i can have only one instance of Google maps. How could i solve this? I had two ideas:
Is there any other solution?
How about keeping your map on a single <div>
that is separate from the page and always stay on top as long as there's a "page" that needs it (e.g. by splitting the page and the map into two Angular controllers and using events on the root controller to synchronise them)?
Another solution is, because the pages sound similar with their navigation elements, that you change the loading logic and only change the contents rather than loading a full page each time.
Otherwise, if google maps isn't a requirement, I've already built an Angular page-based app with multiple maps using Leaflet.js and it works perfectly fine.