I’m making an app that has to be constantly running in the background so the app need to consume minimum power. I also have a Google Maps JS API used in an map page.
Now the problem is:
If I open the app and do not enter the map page, I see the CPU usage is almost 0%. Whenever I go into the map page, the CPU usage start to go up to 3-6% and NEVER stop, EVEN IF I leave the map page or use this.navCtrl.pop() to pop the map page. With that percentage of CPU usage, the battery will drain fast.
My question is:
How can I completely destroy the Google map after I leave a page or completely destroy the map page like I never enter it?
I appreciate for any help!