9

The endpoint for Studio-made styles is available and stable for use with Leaflet. var mymap = L.map('mapid').setView([51.505, -0.09], 13); L.tileLayer( 'https://api.mapbox.com/styles/v1/mapbox/emerald-v8/tiles/{z}/{x}/{y}?access_token=<your token>', { tileSize: 512, zoomOffset: -1, attribution: '© <a href="https://www....


7

Absolutely Matt. Using vectors as the datasource for maps is ideal for high resolution printed output and MapBox vector tiles work well to distribute large data like OSM efficiently. I think the problem in getting something like this working is purely on a software level - you need the capability to mosaic tiles together, apply styles to them, and then ...


5

The feature of calculating label points for polygons on the client is currently in progress and will appear in one of the next releases. See: https://github.com/mapbox/mapbox-gl-js/pull/2678 for the outstanding pull request https://github.com/mapbox/polylabel for the novel algorithm I designed that will be used for this


5

You've got the basic principle right, at each integer zoom level increase the line width would need to double to cover the same geographic area on the map (see zoom levels on the OSM wiki). Expressing this mathematically if you know at a specific zoom level (A) that your line width should be (B) in pixels, then the width of that line at any a given zoom ...


4

Because of how vector-tiles work, you'll actually have to calculate the label locations yourself as a separate point layer. This should be pretty easy to do w/ any GIS program like qGIS/ArcGIS/PostGIS by calculating the centroid of each polygon, doing a spatial join to save the polygon label to the corresponding centroid point, and saving the result as a ...


4

The current version of Mapbox GL JS doesn't let you programatically hide that link. You can hide it with CSS: .mapbox-improve-map { display: none; } This assumes OpenStreetMap/Mapbox is ok with it, as @Tangnar mentioned. Incidentally, even if you programatically disable map rotation, you still need to hide the rotation control button with CSS. ....


3

To enable pop-up, mapbox-gl-js should be used after creating a Style using your datasets in Mapbox Studio. Please look at this 3 part tutorial series by Mapbox. https://www.mapbox.com/help/studio-manual-tutorials/#add-points-to-a-map https://www.mapbox.com/help/add-points-pt-3/


3

I finally gave up trying to find an existing solution and ended up using a combo of Maputnik, Tileserver GL, and a custom script to scrape raster tiles from Tileserver GL. Details are here: https://github.com/CMU-CREATE-Lab/tile-generation Hope this helps.


3

The current GeoJSON specification https://tools.ietf.org/html/rfc7946 does not support any other coordinate systems than this one: "geographic coordinate reference system, using the World Geodetic System 1984 (WGS 84) [WGS84] datum, with longitude and latitude units of decimal degrees". Software developed by MapBox is strict with this requirement. ...


3

There isn't a public API to get all source IDs from a map, but this.map.style.sourceCaches will return an object wherein each key is a source ID and its value is a source cache (the class responsible for managing an individual source). Note that Mapbox Studio automatically composites sources — so, if you've added a custom vector source, rather than ...


3

CartoCSS would need to be processed into a Mapnik stylesheet in order to be applied to your vector tiles. For serving and styling your tiles, I would recommend checking out tilelive and tessera.


3

In QGIS you would do this by choosing a color ramp (or random) and hitting Classify, Mapbox Studio doesn't yet offer this feature but in the meantime if you choose the "Edit property as JSON" at the bottom (after choosing Set value by data): Here you can insert a large list of stops. You could write a program to build that small JSON either using random ...


2

I've wondered the same thing myself. Incidentally, I did run across this link earlier today: http://blogs.terrorware.com/geoff/2012/11/17/offline-map-tiles-in-qgis/ Perhaps you could tweak it a little bit to pull the tiles from Mapbox without downloading the data, rather than from your local machine. Good luck!!


2

This is the official documents from Mapbox: https://www.mapbox.com/help/custom-markers/#locate-custom-styles-images Log in to your account, locate your custom style, and follow the instructions attached in the link above. When you create your custom styles, you can upload your own .svg files with the icons you wish to use (some restrictions apply). Some ...


2

This seems non-trivial, but a very cool effect. Roads and contours have dynamic text-rotate, so I'm certain its possible. In Javascript you would need a way to determine the angle of the lake (some centroid method??). Seems like a lot of work. I've had to do a similar workaround, where I added my own points of interest that required custom text-label ...


2

You can always export MBTiles (vector tiles) using Mapbox Studio, but only using the oldest version (Mapbox Studio Classic). It have options to import many formats and can export MBTiles. Notice that it is a standalone application MapBox Studio Classic.


2

According to MapBox, defining legend HTML for projects built w/ Studio or Studio Classic is not possible. I'll update this answer if that ever changes.


2

Mapbox Studio and Mapbox Maps SDK for iOS v4.0 support expressions, which are much more flexible and powerful than style functions. The first step is to convert your existing textOpacity style function to an expression. Based on this migration guide, the expression would look like this: NSExpression(format: "mgl_step:from:stops:($zoomLevel, 0, %@)", ...


2

Over in the top right under Debug, then at the bottom of the panel you can turn compositing off:


2

You'll find your edited style on the style overview page. Here you can click on the menu button besides your style and choose the "Download" option. A zip file will be downloaded which includes a style.json, a folder with additional icons and a license file. You can upload this (unzipped) style.json to your organizations account by adding a new style and ...


2

ok, I found a way to add this by directly editing the json of the style and using { "base": 1, "type": "identity", "property": "upper_val_m" }


2

There is nothing bad with Mapbox Studio, but I would go in another direction: I would install QGIS 2.18(free open source), which can manage the 200 unique values style easily. https://www.youtube.com/watch?v=BHcq15Ytqj8 and then to put it in the web use some of the plugins like: qgiscloud qgis2web Than other servers could do the same but is more ...


2

Concerning QGIS, this topic (including the reason for missing water features) is covered by How to make an editable City Map from OSM data?


2

In a few bullet points: click the link (log-in if needed); you can´t refer to the tileset without the link change to the Styles tab create or select an empty style and enter to customize click + Add layer and select microsoft | custom use Type | Fill-extrusion if asked, click Move to data Alternatively, you can follow the steps in his GitHub repo to ...


2

You implemented the toggle on/off functionality right. Your layer is not visible, because the alpha channel (which specifies the opacity for a color) of fill-color and fill-outline-color is 0. Setting them both e.g. to 1 your layer becomes visible. 'fill-color': 'rgba(72, 67, 45, 1)', 'fill-outline-color': 'rgba(0, 0, 0, 1)' Your style mapbox://styles/...


1

See Inverting Polygons using QGIS? Here's a basic summary of that post's answers and comments with some additional info: Step 1) Get Ocean data: http://www.naturalearthdata.com/features/; http://openstreetmapdata.com/data/water-polygons; 2) Convert to the Coordinate Refence System (CRS) you will be using (likely the one you're city data is in or the one ...


1

You would upload it as a Mapbox Datasets if you want to be able to edit that data within your Mapbox account, if you don't need to edit it or your happy to edit it externally to Mapbox, go straight to a Tileset. Instead of splitting it into so many layers, why not just have 1 layer called building, and have all your attributes on that layer. You can then ...


1

You just need to find a unique value for each road segment to symbolize off. For example you could specify an objectID or a name field for the road segments and then set the color to whatever color you want. I haven't used Studio for awhile so I don't know what the syntax would look like, but if you follow their guides you should be able to figure it out. ...


1

You could join local JSON data with vector tile geometries: Here is a Mapbox example which shows how to achieve this: https://www.mapbox.com/mapbox-gl-js/example/data-join/


1

This looks to me like the typical color management issue. If one or more of the used applications or (intermediate) data formats used is not aware of color management and ICC color profiles, you can easily end up with shifting colors. The best thing to do to prevent this as much as possible, is to convert your data to sRGB right in the first step, where you ...


Only top voted, non community-wiki answers of a minimum length are eligible