# GPX or GeoJson Track on a Map component

**URL:** <https://forum.inductiveautomation.com/t/gpx-or-geojson-track-on-a-map-component/54074>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [December 13, 2021, 9:08pm UTC](https://forum.inductiveautomation.com/t/gpx-or-geojson-track-on-a-map-component/54074 "2021-12-13T21:08:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marco\_Keller](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@Marco\_Keller](https://forum.inductiveautomation.com/u/Marco_Keller)\
**Post date:** [December 13, 2021, 9:08pm UTC](https://forum.inductiveautomation.com/t/gpx-or-geojson-track-on-a-map-component/54074/1 "2021-12-13T21:08:51Z")

</div>

Hi all,

A customer needs to overlay lines on a Map component (highvoltage Cabel). There need to be sectors of 3 Meters lengh. Those sectors should show different colors acording to the temperaturevalues from the cabel.

I tried to set those long/lat coordinates manualy but this would not be feasible for the whole cable lengh. I tried to use geojson but could not find out how that works.  
Has anybody a example how to use geojson?  
Or is there another way to draw those cables to a mapcomponent for example with a gpx file?

Thanks a lot for your help.  
Regards Marco

---

<div class="post-metadata">

**Author:** ![nathan.boeger](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nathan.boeger/32/87646_2.png) [@nathan.boeger](https://forum.inductiveautomation.com/u/nathan.boeger)\
**Post date:** [December 14, 2021, 3:41pm UTC](https://forum.inductiveautomation.com/t/gpx-or-geojson-track-on-a-map-component/54074/2 "2021-12-14T15:41:11Z")

</div>

Marco is looking at a way to overlay large numbers of small lines (or polylines), each representing 3 meter cable segments. They will not move, but should be capable of changing color based on status. What options are available to accomplish this?

As a resource, I created this document when I was learning to use the Ignition Map component (largely focuses on tile servers and ArcGIS). GeoJSON is mentioned at the end. It may provide a viable option in addition to native Perspective Map elements (e.g. polyline).

[Perspective Maps - GIS Information\_small.pdf](https://forum.inductiveautomation.com/uploads/short-url/nToCmeQBnilKMLDMmFGUz2JJOfS.pdf) (627.7 KB)

---

<div class="post-metadata">

**Author:** ![nathan.boeger](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nathan.boeger/32/87646_2.png) [@nathan.boeger](https://forum.inductiveautomation.com/u/nathan.boeger)\
**Post date:** [December 14, 2021, 5:50pm UTC](https://forum.inductiveautomation.com/t/gpx-or-geojson-track-on-a-map-component/54074/3 "2021-12-14T17:50:39Z")

</div>

From the dev team:  
Best option is to roll your own GeoJSON. First start by creating a static dataset that works how you want on the Perspective Map component (instructions at the end of the [document](https://forum.inductiveautomation.com/uploads/short-url/nToCmeQBnilKMLDMmFGUz2JJOfS.pdf) I posted). We can separately deal with the problem set of dynamically generating the GeoJSON in the appropriate format (queries, scripting, transform, http binding, etc).

Resources to help:  
[https://mapbox.github.io/togeojson/](https://mapbox.github.io/togeojson/)  
[https://leafletjs.com/examples/geojson/](https://leafletjs.com/examples/geojson/)

The Perspective Map component does not currently support “styles”. There is an active ticket (IGN-3354) to improve the map component, work not to start before 1Q22. If you email me a business case tied to customer examples I can get the support and requirement “ask” into the ticket. This ticket should include support for KML and GPX conversion to GeoJSON.

---

<div class="post-metadata">

**Author:** ![Marco\_Keller](https://avatars.discourse-cdn.com/v4/letter/m/b19c9b/32.png) [@Marco\_Keller](https://forum.inductiveautomation.com/u/Marco_Keller)\
**Post date:** [December 15, 2021, 10:32am UTC](https://forum.inductiveautomation.com/t/gpx-or-geojson-track-on-a-map-component/54074/4 "2021-12-15T10:32:12Z")

</div>

Thanks Nathan!  
I will send you the email with the business case.  
Is there any way to set colors of the lines? (something like that [simplestyle-spec/1.1.0 at master · mapbox/simplestyle-spec · GitHub](https://github.com/mapbox/simplestyle-spec/tree/master/1.1.0))?

---

<div class="post-metadata">

**Author:** ![Bruce\_Altmann](https://avatars.discourse-cdn.com/v4/letter/b/858c86/32.png) [@Bruce\_Altmann](https://forum.inductiveautomation.com/u/Bruce_Altmann)\
**Post date:** [August 2, 2023, 6:15pm UTC](https://forum.inductiveautomation.com/t/gpx-or-geojson-track-on-a-map-component/54074/5 "2023-08-02T18:15:01Z")

</div>

Did KML into Map components / layers get released?

I am being asked to import KML for nat gas piping.
