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?
Where did you find the $1000 quote? I know you can have them hosted unlimited for $245/month but I was fairly sure it was free for self-hosted use.
If you select "commercial product or company web", you're asked to pay for it: https://i.imgur.com/TrAmju4.jpg
If you select any of the non-commercial ones, the newest map data you get is from 2017 (!).
I'm not against paying, but it's not free!
See here: https://openmaptiles.org/docs/generate/generate-openmaptiles...
I think the best open vector map style is OSM liberty . My fork, which includes my generated hillshade and contours, is here .
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. :)
> Have y'all noticed a decrease in search traffic (or general brand/product awareness) since Google Stadia launched?
We've actually seen an uptick because of badly placed keyword searches for Stadia.
We also aren't exactly sure the best way to counter it, but we're working on figuring out the best way. We don't really have a legal resource, either, given we didn't have a trademark before Google Stadia came along.
$ curl 'https://tiles.stadiamaps.com/styles/alidade_smooth.json'
<html><body><h1>502 Bad Gateway</h1>
The server returned an invalid or incomplete response.
Very unfortunate timing there. We had a cache server wedge, and the failover mechanism didn't detect it quickly enough. We've diverted traffic manually and are working on bringing the bad region back into the mix after it went down.
Things should be working again now, at least.
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 email@example.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
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.
There is only one issue I encountered in the short few years it's been my go-to choice, which is that there are no plugins to integrate Google Streetmaps or Streetview. There are however, for leaflet as Google Mutant and Leaflet Pegman.
What is the level of maptalks integration with Google layers? How is it better than mapbox-gl?
There is an issue with the zooming and baselayer being completely out of sync with the buildings here:
If that’s the case I’m totally ditching maptalks for all it’s quirks.
And I don’t know of any libraries for google street view integration, but a dev I work with has done a fantastic job of integrating street view with map box. I’ll try to dig up some of his code
> but a dev I work with has done a fantastic job of integrating street view with map box. I’ll try to dig up some of his code
This would be a pretty popular library, I am sure! The issue is that the Google EULA prohibits the use of their data directly, it has to be accessed using Google Maps SDK. So Google Mutant Leaflet plugin has to use the API to download the tiles and then exposes the Google Layer a custom Leaflet Layer, but it works :) On the mapbox issue tracker, they close all issues inquiring for help in implementing such a custom layer, so if your coworker did this, I'm sure it was a non-trivial exercise, kudos to him! :)
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
The figure 217 GB comes from the cumulative size of all the pandas DataFrames containing the whole dataset (as mgspack files). The lossless compressed figure comes from the total size of the highest zoom level.
It didn't take that long, it was mostly done overnight (so around 10 hours in a i7 server with 24 GB RAM).