Open ThomasDaheim opened 8 years ago
Could you avoid the cloudfare call? Why is it need?
<script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.4.13/d3.min.js" charset="utf-8"></script>
Maybe we should use a different Leaflet plugin: https://github.com/makinacorpus/Leaflet.FileLayer https://github.com/mapbox/leaflet-omnivore
The first array_push should be array_push($conf['file_ext'], 'gpx', 'kml');
http://php.net/manual/en/function.array-push.php
Could you provide a sample KML file link that I could download so I could test.
I have simply taken the kml.js that I could find. Whatever works is fine with me :-)
Fine to change the array_push - as I said, I don't really speak php
BTW, I have noticed that for kml the start and end markers can't be set. Have removed that.
In addition, I don't think that kml has info for a profile. But I didn't dared to remove that from the template...
it won't work
if ( (array_key_exists('path', @$picture['current']))
&& (strpos($picture['current']['path'],".gpx") === false
&& strpos($picture['current']['path'],".kml") === false))
Should be
if ( (array_key_exists('path', @$picture['current']))
&& (strpos($picture['current']['path'],".gpx") === false
|| strpos($picture['current']['path'],".kml") === false) )
As in If path and (GPX or KML)
Where is kml.js
coming from?
Please add an header so we know the author and the license.
Code above works here without issues :-)
My reading was: "return if path and (not gpx and not kml)" since your checking whether picture path & file contains ".gpx" or ".kml" extension. With your code you would return if either gpx or kml - thats not what we want, right?
What is the status of this? I was trying to get lots of gpx files working again.
Probably, gpx.inc.php should be renamed as well...