0

I would like to have the following result :

enter image description here

so I use the upload API from Mapbox to push my GPX file (https://github.com/mapbox/mapbox-upload). But somehow I have this result :

enter image description here

How can I have the trail + the map together !?? :-)

Thank you !

Nicolas Henin
  • 3,244
  • 2
  • 21
  • 42

1 Answers1

0

Usually, you'll use Mapbox Studio. Once you have your source uploaded(the purple trail), you need to create a style that consumes the source.

To add a basemap, you'll have to composite the already available Mapbox.streets source with your custom source in a new style (this is done by appending the sources togethers in the Sources dialog. You'll end up with: mapbox.streets,your-custom-source-id-goes-here). Once combined, you'll be able to style both the basemap and your trail data in Mapbox Studio.

Programatically, you can also combine the layers as seen here: https://www.mapbox.com/mapbox.js/example/v1.0.0/compositing/

kmandov
  • 3,130
  • 16
  • 15