Open poVoq opened 9 years ago
I will look into this.
Supporting this would be excellent -- would be a first step towards replacing Runkeeper/GarminConnect/etc for me.
I have looked into GPX/etc support for Leaflet, and from what I can tell there are two better alternatives than the one suggested above:
1) https://github.com/mapbox/leaflet-omnivore - loads files on server-side, supports GPX/KML/etc. There is a demo here: https://www.mapbox.com/mapbox.js/example/v1.0.0/omnivore-gpx/
2) https://github.com/makinacorpus/Leaflet.FileLayer - loads files on client-side, supports GPX/KML/etc. This is clever as things only happen in the client, although integration with ownCloud becomes harder.
I think we should use the first one, as our purpose is to either open such files from within owncloud or them from the app's own database.
Great to see that there is progress on this.
One general remark though: it would be nice if the system would not convert .kml into .gpx internally, as you loose a lot of the functionality of .kml (like lables and geometry like circles etc.) though this.
the used library (omnivore) supports native kml parsing. Don't know if this is lossless. Haven't tried it with kml files. You could test it yourself (replace omnivore.gpx(...)
with omnivore.kml(...)
) or send me a kml file and I will test it.
Ahh, ok... well according to the list of features here: https://github.com/mapbox/togeojson (this is what omnivore is using), the .kml support it quite ok. Doesn't seem to support overlays, but its otherwise quite usable. Will probably test it is a few days with some files from http://www.waterpointmapper.org/
Tested it with a testfile yesterday and seems to work.
Are there any test kmz files scheduled??
Currently I use MAPS.ME as off-line maps. They use KMZ files for storing location information. It would be great to be able to import these files into maps, to tarnsfer easily the points of interests resp. personal locations, without any external Cloud service!!
regads, hitam4450
I tested it with a downloaded example file. I will implement this option, but I'm currently on holiday and won't be back before the end of september.
To foster collaboration, cc'ing other folks who work on GPX apps:
@Frank1604 @eneiluj let’s work together on one nice Maps app with proper functionality. :)
Is there an option to display kml or gpx files by uploading it to the files section and starting the maps app?
There is a plug in for leaflet that should allow both file types. See: http://psha.org.ru/b/leaflet-plugins.html
An advanced option would be to allow selecting layers of multiple kml and gpx files to be displayed the same time, but for now a simple show kml from the files app would do.
Thanks!