top | item 21754642

OpenLayers

316 points| devicetray0 | 6 years ago |openlayers.org

88 comments

order

mourner|6 years ago

Leaflet author here! Just wanted to note that if you haven't looked into OpenLayers in a few years, you absolutely should — it's astonishing how much it progressed: from something that I was so frustrated with that it prompted me to write Leaflet in the first place (11 years ago) to a modern, fast, well-engineered and lovingly maintained library.

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.

guu|6 years ago

Thanks for creating Leaflet and Mapbox GL!

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?

CalRobert|6 years ago

Thank you for building leaflet. It (and scrapy) are how I wound up finding the house I live in now - a quirky, dirt cheap cottage I'd never have taken note of without the tools to filter and visualize a whole country's listings.

ughitsaaron|6 years ago

Thank you so much for all the work you put into creating and maintaining Leaflet. It’s pretty remarkable how much time and energy you (and others, of course) put into making something so complex so intuitive.

iguessthislldo|6 years ago

I'm gonna hop on the bandwagon and thank you as well. My senior project was built with Leaflet.

conroydave|6 years ago

hey thanks for building leaflet

rickette|6 years ago

When compared to the other two major OSS libraries I would say:

- 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.

giancarlostoro|6 years ago

Thank you so much for this, I was wondering what the differences were. I've used Leaflet, but not OpenLayers or Mapbox.

baroffoos|6 years ago

What do you mean requires a gpu? Doesn't all computing with a gui require some kind of GPU?

atombender|6 years ago

Speaking of, does anyone know a cheaper service than Mapbox and Google Maps for raster tiles?

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.

bransonf|6 years ago

If you can find the time to set it up, OpenMapTiles [0] is the way to go. In the long run, you’ll probably save more money than the time it takes to manage.

[0] https://openmaptiles.org/

lukeqsee|6 years ago

We built Stadia Maps to save you the trouble and the expense.

https://stadiamaps.com

Happy to answer any questions! (I’m a cofounder.)

ruffrey|6 years ago

We are hosting about 150GB of map data, raster and vector, with the following stack: - MapProxy with Redis cache - MapServer for rendering - PostGIS for data storage

mdasen|6 years ago

https://stadiamaps.com

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-mapbox|6 years ago

Hey, @atombender.

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!

durkie|6 years ago

I'm in a similar boat, looking to generate my own vector tile static images (basically raster tiles with fractional zoom levels). I use a fair amount of these, and there's no service that lets you cache them (of course). Seems like Mapbox and Maptiler are the only games in town.

geuis|6 years ago

Don’t know about cheaper, but Planet (planet.com) offers daily imagery. Worked there a few years ago.

andrewshadura|6 years ago

OpenLayers was one of the first open source libraries of this kind; sadly it's lost some development momentum back when everyone was using it in 2008 or so, and nearly everyone switched to (then faster) alternatives like Leaflet.

jackinloadup|6 years ago

Anyone know how OpenLayers compares to Leaflet today?

nkoren|6 years ago

We use OpenLayers extensively in my company (https://www.podaris.com), and we push it really, really hard. It's the basis for a parametric CAD system, a bunch of GIS tools, and most recently, transport micro-simulation. It had a steep learning curve, but has held up remarkably well over the years, with remarkably few instances where it's been the bottleneck.

Definitely recommended!

maliker|6 years ago

We used openLayers, ran in to performance issues, switched to Leaflet, and couldn't be happier. Just our experience, for what it's worth.

zefman|6 years ago

We had the exact opposite problem! We built a custom webgl rendering layer on top of leaflet to get around leaflet's performance issues. We have now switcher to openlayers and very happy. Guess it depends on the exact use case.

k__|6 years ago

I used Leaflet and had to do some things with realtime visuals in D3 as overlay for Leaflet, because of performance issues.

Demiurge|6 years ago

What kind of performance/use case did you have? I haven't touched leaflet since the giant rewrite.

pkalinowski|6 years ago

Some time ago I checked out three libraries for my amateur small navigation app:

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.

mzur|6 years ago

I like OpenLayers. We built a rather complex image annotation tool around it and OpenLayers worked well with all the features we added over the years, recently even a full-blown video annotation tool. The community is nice and active, too. Best of all: It's still compatible with our old school way of JS development. The only thing I'm missing is the API documentation of older versions which they seem to have dropped at some point.

moonfleet|6 years ago

We use OpenLayers at our company. We are building an interactive map with a bunch of tools for measuring distance, calculating routes, drawing features, displaying diagrams right on top of the map, and OpenLayers is doing wonders for us. It has a steep learning curve but once you grasp the fundamentals, you can figure out how to do all kinds of magic tricks with it.

nkoren|6 years ago

What's your company?

herogreen|6 years ago

What is the advantage of having the documentation CC-BY 3.0 licensed ? In cases where documentation is generated from the code it seems more convenient to use the same license for both.

n1vz3r|6 years ago

I used OpenLayers back in 2008-2011 for mapping-heavy web application. It was of very high quality, and had great API documentation (using DoxyGen, iirc). Taught me some things about pre-modern-craze Javascript programming (i.e. how to correctly implement inheritance in JS)

kls|6 years ago

just did a port from a custom D3 map solution to OL due to mobile requirements. I can say the OL's mobile support is first class.