I'm using Ionic and ng-map. I have to display different KMLs (one at a time and on user request). The KML loads on the map but only for remote KMLs. So this one works:
<div style="height: 100%">
<ng-map center="41.876,-87.624" zoom="15" map-type-id="HYBRID" style="display:block; width: 100%; height:100%;">
<kml-layer url="http://googlemaps.github.io/js-v2-samples/ggeoxml/cta.kml"></kml-layer>
</ng-map>
</div>
My local KMLs are in a kml
folder inside www
directory in my Ionic app.
And I'm loading a local KML file like this (same syntax as the remote KML file):
<div style="height: 100%">
<ng-map center="41.876,-87.624" zoom="15" map-type-id="HYBRID" style="display:block; width: 100%; height:100%;">
<kml-layer url="./kml/cta.kml"></kml-layer>
</ng-map>
</div>
But the KML lines don't show up like the remote KML file. The map is loaded but just without the lines specified in the KML.
So, does ng-map
require a remote KML to load the KML specs? Is this a bug on ng-map
or Ionic directories?
I don't get any errors or anything indicating that there's anything wrong except that the local KML file can't seem to be read that the specs won't show up on the map unlike the remote KML file.