Hi,
Could someone post an example how to use kml, gpx or topojson to create for example polyline/ track as a layer?
Best Regards,
Toni
Hi,
Could someone post an example how to use kml, gpx or topojson to create for example polyline/ track as a layer?
Best Regards,
Toni
The documentation describes how to use it.
Yes, I know. I need some example, because I cannot get kml to work.
So provide the flow you are using with KLM so people can help you figure out what is the issue.
[{"id":"f4dbc5c.cb1c638","type":"inject","z":"3d2cb149.f7ca6e","name":"","topic":"","payload":"","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":"","x":210,"y":760,"wires":[["b23c42b8.fd5c9"]]},{"id":"b23c42b8.fd5c9","type":"function","z":"3d2cb149.f7ca6e","name":"add new layer","func":"msg.payload = {};\nmsg.payload.command = {};\nmsg.payload.command.map = {\n \"overlay\": \"Reitti\",\n \"kml\": \"<kml><Document><Placemark><LineString><coordinates>23.979809737835808,61.489852425755885,154.70000000000073 23.9794614373468,61.490159999602824,154.63282247865766 23.979444644562818,61.49017489964261,154.66684112040653</coordinates></LineString></Placemark></Document></kml>\"};\nreturn msg;\n\n","outputs":1,"noerr":0,"x":440,"y":760,"wires":[["ee87554f.650c08"]]},{"id":"ee87554f.650c08","type":"worldmap","z":"3d2cb149.f7ca6e","name":"","lat":"","lon":"","zoom":"","cluster":"","maxage":"","hiderightclick":"false","coords":"none","path":"/worldX","x":770,"y":880,"wires":[]}]
Unfortunately your flow isn't currently importable.Please read the following post How to share code or flow json and then edit the above message.
But here's an example of a working gpx
[{"id":"e6cafba3.9c9818","type":"function","z":"9e9d87d7.596b8","name":"","func":"var m = {overlay:msg.topic, gpx:msg.payload};\n\nmsg.payload = {command:{map:m}};\n\nreturn msg;","outputs":1,"noerr":0,"x":471,"y":103,"wires":[["e0901d7e.5d96b8","7a5eca14.e6428c"]]},{"id":"e0901d7e.5d96b8","type":"worldmap","z":"9e9d87d7.596b8","name":"","lat":"","lon":"","zoom":"","layer":"Watercolor","cluster":"","maxage":"","usermenu":"show","layers":"show","panit":"false","hiderightclick":"false","coords":"none","path":"worldmap","x":637,"y":105,"wires":[]},{"id":"792a879c.26a36","type":"template","z":"9e9d87d7.596b8","name":"","field":"payload","fieldType":"msg","format":"handlebars","syntax":"plain","template":"<gpx>\n <rte>\n <name>A busy route</name>\n <rtept lat=\"50.82052\" lon=\"-0.14491\">\n <name>Start</name>\n </rtept>\n <rtept lat=\"51.4996\" lon=\"-0.12546\">\n <name>end</name>\n </rtept>\n </rte>\n</gpx>\n","output":"str","x":307.5,"y":104,"wires":[["a9ae41d4.c62808","e6cafba3.9c9818"]]},{"id":"fffe28fa.ee019","type":"inject","z":"9e9d87d7.596b8","name":"","topic":"the dash","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":130.5,"y":102,"wires":[["792a879c.26a36"]]},{"id":"a9ae41d4.c62808","type":"debug","z":"9e9d87d7.596b8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":436.5,"y":382,"wires":[]},{"id":"7a5eca14.e6428c","type":"debug","z":"9e9d87d7.596b8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":519.5,"y":260,"wires":[]}]```
Thanks, I will try to work it out with you example
Thank you ukmoose, I will use gpx format