Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

If I upload a gpx trace to convert it into a tileset, I can use it in the Style editor just as expected. But if I upload a second and want to use it as a data source for another or even the same layer, It is greyed out with the following notice:

This source includes vector layer names that are already in your composite source. vector layer names must be unique.

I didn't set any name myself or changed the gpx traces in a weird way. I even renamed the style layer. I looked into the details of the automatically created tileset but I couldn't see a name which was the same on both sources. The only thing that both gpx traces had was the "tracks" part of the source, which contained the actual trace. But I can't figure out how to change this name.

Is there some way to upload two gpx traces and use them in the same style?

I want to avoid workarounds if possible but if it doesn't work another way, I imagine that there are at least two workarounds: 1. Convert into a geojson file, upload as a dataset and convert into a tileset. 2. Somehow append multiple gpx files into one, but keep the traces separate.

What would be the downsides, apart from having more files to keep up2date? Is (2) even possible?

Update:

In the end I did convert the gpx files into geojson tracks. THis did work exactly as hoped. But I'm still interested if there's a shorter way or if I just did something wrong previously.

Disclaimer: I work at Mapbox.

It isn't possible to upload multiple GPX files directly to the same map style in Mapbox because their layer names are automatically set as track . To fix this, I recommend following these steps:

  • Convert your data to GeoJSON using a tool like toGeojson
  • Upload the GeoJSON to Mapbox Studio
  • Add the data to your map in Studio or GL JS
  • So to answer your question: you are going about this the correct way. One thing to note: you don't have to upload it as a dataset first. You can upload your GeoJSON as a tileset directly, unless you have some editing you want to do first.

    Thanks for contributing an answer to Stack Overflow!

    • Please be sure to answer the question . Provide details and share your research!

    But avoid

    • Asking for help, clarification, or responding to other answers.
    • Making statements based on opinion; back them up with references or personal experience.

    To learn more, see our tips on writing great answers .