Cordova-plugin-googlemaps: map.addKmlOverlay() does not work if page url contains '#hash'

Created on 16 Aug 2018  路  11Comments  路  Source: mapsplugin/cordova-plugin-googlemaps

this.map.addKmlOverlay({ 'url': "assets/overlay.kml" });

This works in 2.3.9 normally, but stopped working when I updated to 2.3.11
I'm working with 'file://' not localhost webviews.

bug fixed

All 11 comments

In order to reproduce your issue 100%, please share your project files on GitHub.

ping

I made another test using this quickdemo and it happens exactly the same. My project is too big now, I think it's better to test in this demo just change the plugin version and try KML page.

In 2.3.9 it works if using 'file://' but not with localhost
In 2.3.11 it works in localhost but not with 'file://'

I think ionic serves the index.html file on http:// always.

I forgot to say that I'm not using 'cordova-plugin-ionic-webview' because of CORS issues, so it shows 'file://' on Origin requests

Thank you for waiting, I can not confirm your issue.

The KmlOverlay demo of ionic-googlemaps-quickdemo works perfectly even file:// protocol.

screen shot 2018-08-21 at 9 59 15 am
capture

I found the problem, I'm using lazy loading so Ionic route works differently. Look at the screenshot:

capturar

If you remove all pages from app.module except HomePage and change page title to string in app.components you will see it wont load.

Please create the reproduce demo project, then share it on Github.

Thank you for creating the demo project, it's perfect for the inspection.
I fixed the bug. Please reinstall the plugin from the multiple_maps branch.

Was this page helpful?
0 / 5 - 0 ratings