Reputation: 1122
I have some GeoJSON data containing some locations I'd like to show on my map. Since it contains also the style (marker-icon, marker-size, etc.), right now I am using this data as
map.setGeoJSON(my_data);
These locations will never change, I want to add them as a Vector Tile. Is there a way to do that with MapBox studio? I tried to put my_data in a file and load it in MBS, but I don't know how to style them as they were the default markers of MapBox.
Thank you
Upvotes: 0
Views: 552
Reputation: 3663
Since it contains also the style (marker-icon, marker-size, etc.)
Do you mean it follows MapBox's simplestyle spec? If so, this simplestyle is only intended to style geojsons in the browser, not vector tile sources in MapBox Studio.
If you want to style them in MapBox Studio, you have to use CartoCSS: create a Studio Source project with your geojson, and create a Studio Style project to style them w/ Carto. Checkout the maki icon set and reference the icons you want for each point using the marker-file: url("path/to/icon.png");
property.
Otherwise, you can load the geojson into your map in the browser using mapbox.js and apply their simplestyles.
Upvotes: 0