Quantcast
Channel: Question and Answer » mapbox
Viewing all articles
Browse latest Browse all 20

Mapbox.js: Accessing data markers created in Mapbox Studio

$
0
0

I used Mapbox Studio to create some projects because my data set was too large to use Mapbox Editor. I loaded my data into a source project and then used that source as a layer in a style project, which I then uploaded to Mapbox here.

I used conditional formatting rules in CartoCSS to color-code the data markers based on the “species” represented (the map is created from migration data of large marine animals). I would like to create another map using Mapbox.js that allows me to change the marker color based on whether that species is selected or not, like this one.

If a species is not selected, the marker should be dull gray in color, if the species is selected, it will be its vibrant color.

My question is: how do I reference those individual species markers that have been cooked as a source project into a layer of the style project in Mapbox Studio? Can I use Mapbox.js to access the CartoCSS or will I need to access some GeoJSON? The data was originally uploaded as csv so I would need to understand the GeoJSON working behind the Mapbox scenes (if that is what is happening).


Viewing all articles
Browse latest Browse all 20

Trending Articles