It's especially great when you're doing complex GIS stuff and need a ton of features and formats supported out of the box. As for other libraries, I'd recommend Leaflet for simple maps, and Mapbox GL for rich, highly interactive apps that benefit from vector rendering tech (I'm biased since I contributed to both), but it's great to have OpenLayers in the mix — there's a library for anyone's needs, cross-inspiration moves all three forward, and the mapping software landscape in general is greater than it has ever been.
Do you have any specific examples of "complex GIS stuff" (Uses OpenLayers) or a "highly interactive app" (Uses MapBox GL)?
Are there any big feature gaps from leaflet->mapbox-gl that developers should consider when choosing a mapping library?
Don't have any particular OpenLayers examples in mind at the moment but it's very heavily used in government, enterprise and academics — sectors that often need advanced projections, use various obscure formats / protocols and prefer all the features to be packed in one product and maintained consistently by one team.
For Mapbox, here's a showcase https://www.mapbox.com/showcase. It especially shines in apps that need to render hundreds of thousands of features at once, maximum customization in how the map looks and feels, updating map appearance dynamically in real time, or some cool animations.
In terms of features, Leaflet has a huge plugin community and there's a plugin for pretty much any feature since it has been around for 8 years, although their quality varies (the core is top-notch though). Mapbox GL will need to catch up on that front certainly, but on the other hand, there are things that are simply not possible with raster-based mapping libraries — things like making any feature you see interactive, changing the map appearance in real time, rendering millions of features (with high perf viz features like clustering, heatmaps, advanced labeling etc.), and general smoothness of user experience (smooth zoom transitions, labels adjusting to rotation and pitch, etc.).
There are mapbox-gl-draw plugins to make it comparable to Leaflet.draw but these are features IMO that mapbox-gl-draw probably should have had in the first place.
So, as someone who works with mapbox-gl-js a lot, that is something I see as a gap.
When I was working with this stuff, Leaflet was more "view only" and not so much editing. This was back in the "have to support IE6" days. I remember trying Leaflet for a simple project, but gave up since I could not set a bounding box for panning (the map was only supposed to show a limited area of the world), while OpenLayers seemed had every API feature one could wish. Although more bloated, less polished :)
- Leaflet. Widely known, suitable for mostly simple use cases.
- Mapbox GL JS. State of the art library based on WebGL. Mapbox started off with a fork/extension of Leaflet called Mapbox.js but over time has moved on and created the Mapbox GL JS library from the ground up. Very fast, but requires a GPU due to WebGL.
- OpenLayers. Often used by more professional users. Probably the most features complete library. Also usable without a GPU.
I have an app that uses Leaflet for rendering, and Mapbox purely for its raster tiles (both plain maps and satellite required). Mapbox has been cheap for us, at about $50/mo. But with the new pricing structure taking effect in December, it's now about $450/mo. I believe Google and Bing are both more expensive than that.
I've been considering setting up OSM, but I'd like to avoid having to run and maintain it.
Edit: Also it's $1,000 for commercial use, even to use with OSM data?
Happy to answer any questions! (I’m a cofounder.)
You don't even show up in the "stadia" search results without the term "maps" added.
If it wasn't scary and expensive to sue Google for a name change, this seems like a case of Google (probably unwittingly) crushing your brand and trademark with their own.
Have y'all noticed a decrease in search traffic (or general brand/product awareness) since Google Stadia launched? And if so, do you plan to do anything about it?
Really cool product! Your maps look slick and super clean. :)
$ curl 'https://tiles.stadiamaps.com/styles/alidade_smooth.json'
<html><body><h1>502 Bad Gateway</h1>
The server returned an invalid or incomplete response.
</body></html>
Tried from multiple locations to make sure.Stadia Maps is pretty cheap. $25 gets you 25,000 map views per day or around 750k/month. $100 gets you 250k/day or around 7.5M per month.
Joe here from the Mapbox billing support team. Feel free to reach out to help@mapbox.com. We can dig into your implementation with you to see if there are ways to limit your API consumption (and reduce your overall bills).
Things like limiting panning/zooming can help limit the number of tiles your end users load. Fewer tiles -> cheaper invoices
https://docs.mapbox.com/mapbox.js/example/v1.0.0/maxbounds/
There are other options as well. That said, it's hard to know exactly without taking a look at your map specifically. Let us know!
Their website is quite confusing though, if you ask me. A starting point might be https://developer.here.com/sign-up?create=Freemium-Basic&kee...
I've used Leaflet for a few years and now OpenLayers for about 5 years to author UIs for monitoring robot fleets in real-time as well as build Web-GIS applications for mapping and configuring, autogenerating, validating the spatial datasets (fiducials, SLAM data, navigable positions, "zones", "pathways", etc.)
Leaflet is what I'd say will fit most people's needs when it comes to your standard web-map use cases. It's a beautifully designed library with a good level of modularity and lots of plugins. The API is great.
OpenLayers shines when you get into a lot more complex stuff. The symbology engine is phenomenally powerful and I found that the API plugs into more complex Redux-style state management in a more easy way than Leaflet.
I also found performance when doing high-volume, high-frequency data updates and interactions to be faster with OpenLayers.
That being said, I haven't dug deeply into Leaflet in about a year and things can change quite quickly!
I suspect the overwhelming majority of developers aren't doing anything all that novel or complicated. They're not making Web-GIS applications and probably will do just fine with either.
EDIT: My favorite open source library right now is maptalks. Basically mapbox sort of functionality and rendering, but totally free.
Definitely recommended!
We were going to do something to optimize it in OpenLayers by simplifying the shapes, but when we tried it in Leaflet it just worked a lot faster (fast redraws). We think it's something around how Leaflet dynamically switches to a canvas renderer for big datasets.
Leaflet - it doesn't have map rotation, so it was a dealbraker for me. People on Stack Overflow were talking about ugly hacks, I didn't want to go into the rabbit hole.
Mapbox - I found docs little clunky (again, I'm amateur so it may be the reason I didn't get it) and couldn't really work out what's paid and what's free. Didn't spend a lot of time on them, though.
OpenLayers - I think it's the best one feature-wise, but documentation is rather for more advanced developers. I struggled a lot before finally grasping how it works and still, it's not easy. Getting started guide like Vue.js has would be immensely helpful.
I ended up with OpenLayers and I'm pretty satisfied for now, despite needing fairly long time to actually implement features properly.
Although the image is not a map at all, I tiled it and served it as a custom map layer. You can view it at https://finance.alisio-computing.eu