Open AmeliaBR opened 5 years ago
In addition to the Maps API slippy maps that @AmeliaBR linked above, Mapbox allows you to style maps through their Mapbox Studio web application, generate a link and use those as an iframe source. I have written up the capabilities for these below. In general, the Mapbox Studio maps are more customizeable in every way, except for hiding and showing default map controls, which is possible in the default HTML slippy maps. I have not figured out how to replicate these with the Mapbox Studio map URLS.
Fully supported, a bit more setup than the others due to the customizeability. Requires an API key.
Yes, you can use Mapbox's default tilesets, of which there are several options, or upload your own. Default data is pulled from Open Street Map.
No support, only supports Web Mercator.
Full support. Puts others to shame, allows you to add multiple custom markers and specify custom icons and custom labels.
Full support! First embed that allows you to do so. You add this in a similar manner to points, as a custom dataset through their UI. You can draw a line or polygon with the UI or upload your own data.
I believe this is not supported with embeds, this is possible through the Mapbox GL JS library.
Mapbox has a static images API that can be configured via URL, but the JS embeds do not fall back to a static image.
Supported except the buttons do not have any focus outlines.
Supported, possible to pan with keyboard but no focus styles.
Supported
Supported
Supported, same caveat of text may be too small
Supported
Supported
This is hidden under a tooltip like element, but this element is activated on hover and is not accessible to keyboard users.
Full support, Mapbox Studio allows for non developers to customize styles through their user interface
No support
Partial support, HTML slippy map URLS can have configuration options passed into the URL, but Map Studio based maps cannot.
slightly harder to do in map studio as their geocoder will automatically look for landmarks around your provided lat/long instead of just adding your input as a point, but it is possible to work around this
Full support, their geocoder seems less 'smart' than Google's as it often took me multiple search queries to find an address, but it does work.
No support.
No support.
@AmeliaBR A gentle reminder, it might necessary to whitelist 'api.mapbox.com' in order to have the mapbox embeds display properly.
@nchan0154 Done. Although I haven't replaced the keys in the iframe embed code URLs, so they're still using your key. Feel free to swap them to the one from the JS code if you like.
I broke the MapBoxGL API examples by accidentally including my own key in a recent commit. Fixing now…
This issue is for discussion of the reference tool "Mapbox GL JS API and Mapbox Studio embed".
Mapbox, in addition to providing map tiles, have lots of APIs for building applications with them.
Examples and API reference for the MapBox JS framework