Skip to content

Working with layers

David Inga edited this page Sep 9, 2019 · 4 revisions

How to work with layers in Mangrove Atlas

We designed this methodology in order to have Mapbox as the main layer's provider. More info about Mapbox's way.

Then, depending on the kind of layers it could be:

Vector or raster layers (importing data)

1. Tileset

Inside Mapbox Studio we have to import the datasets as a tileset. If we want we can import a dataset and the it could be promoted as a tileset. More info here.

2. Create a style

Before adding to the front end we have to add the tileset to this layer in Mapbox Studio.

This styles could be created for any member of the team but a designer should edit in some moment.

3. Adding to the front end

After the layer has been added to the "Layer live" style, the front end team are able to add this layer taking the mapboxgroup id and then add to the layer spec filehere.

The layer spec file has all the info and relationships with dashboards, locations, and widgets.

Raster layers from an external source

1. Tile URL

  • Save tiles. It could be saved in a service like Amazon WS or Google Cloud Storage.
  • Set CORS for localhost, mangrove-atlas.herokuapp.com, mangrove-atlas-staging.herokuapp.com, and the production domain.

NOTES:

  • Raster layers could not be styled by the front end, it could be styled and exported before.

2. Create the style in the front end application

As it could not be imported in Mapbox Studio, the front end team have to create the style manually in the application following this example.

  • Please specify zoom levels.
  • Please fill the attribution option.