Invalid KML file using Smart Map Plugin I'm using Smart Map for Craft 3 to develop this filterable map for Columbia, Missouri. Here's the staging site:
http://visionzerodev.org/map-alpha/
This works brilliantly. Huzzah.
Now, I also need to add a couple of KML layers to it.
Here's where I'm developing the KML proof of concept:
http://visionzerodev.org/map-bravo/
BUT — I get the this error: &quot;Invalid KML file&quot;.
I'm sure I'm missing something obvious.
The KML is importable in Google Maps:
(It was previously used as is in FusionTables)
https://drive.google.com/open?id=1J4epYVJPZXFrmQjq19PSfQuMiTGWmcbt&amp;usp=sharing
The KML file is publicly accessible here:
http://visionzerodev.org/assets/data/high-crash-network.kml
Here's my Twig:
  {% set kmlFile = '/assets/data/high-crash-network.kml' %}

  {% set options = {
    height: 600,
  } %}

  {% if kmlFile %}
    {{ craft.smartMap.kml(kmlFile, options) }}
  {% endif %}
I like where you're going with this, but what you're trying to do isn't possible (yet).
As it currently stands, you need to use an Asset as the kmlFile parameter...
https://plugins.doublesecretagency.com/smart-map/kml-files/
It's on the roadmap to allow a string URL to be passed in directly.

UPDATE:
I've just added the ability to specify a KML by its absolute URL string. The new feature will be included in the next release of Smart Map. :)