Leaflet 1.0 – A JavaScript library for mobile-friendly interactive maps
leafletjs.com
leafletjs.com
It might not be build on the latest reactive, functional style but I think it's one of most useful javascript libraries I've used.
I miss coding maps... ;-) Are there ideas somewhere of things to do...?
Please.
[0] http://factfinder.census.gov/faces/nav/jsf/pages/index.xhtml
Surely you could do some novel visualizations using maps.
https://www.census.gov/geo/maps-data/data/tiger-line.html
ftp://ftp2.census.gov/geo/tiger/TIGER2016/CD/
The layer architecture can be easily combined with React. Just write react-components for the layers, shapes, or markers and use React's lifecycle-hooks to add/remove them from the map.
https://gist.github.com/fab1an/f040edbd939989d3a2557f15d2b9e...
If you're curious, you can see an early example at https://www.lanesurfing.com/
For the React crowd, check out react-leaflet:
https://www.collaboraoffice.com/community-news/libreoffice-o...
We have a friendly relationship with the OL3 folks, even though sometimes we're jealous of their WebGL rendering, and sometimes they're jealous of our lower learning curve.
For example, OpenLayers divides fetching data (Source), parsing data (Format) and interacting with data (Layer) into individual pieces. So it's relatively straightforward to handle a case where someone decided to go invent their own data format without having to subclass half the system and patch it.
For smaller projects leaflet is significantly smaller and simpler, and definitely is the right approach. But if you need to do "a lot" with a mapping system OL3 probably has it built in and supported instead of maybe available as an extension.
It came to me, that after all, they have to, if they want to display ortophoto or satellite tiles.
I was thinking more in the terms of street maps or thematic maps, where mapbox-gl-js displays them in a very nice way using vector tiles.
I wouldn't say it's more complex. mapbox-gl favors a more declarative style (look into "Map Style" in the docs), but the concepts are not that different than Leaflet.
Web GL features (such as video support) is an obvious advantage, and part of why we chose it. We don't use plugins for this project, so can't say much about that.
It's true that Mapbox currently focuses its efforts on GL, but they are not "moving away from Leaflet" — Leaflet will continue to be supported as one of the first-class clients to be used with Mapbox services (and GL-based styles have a raster tiles fallback). Leaflet is very mature, has a huge community, is suited for most simple mapping needs, is very easy to learn, and doesn't require a lot of development effort from the Mapbox side to support.
Mapbox GL on the other hand represents a vector rendering technology, which is very different. It is much more powerful than conventional raster tile based clients, and enables applications never seen before in the online mapping industry, but it's also many times heavier, more complex, and much harder to learn. Rendering vector data on the client is something Mapbox bets on as the future of mapping, but it's incredibly challenging to build, so it requires a lot of focus.
I'll continue to maintain both libraries — while they have some overlap, there's a place for both.
The OL3 folks have been working hard on making OL3 leaner (see the "Faster, smaller, better" talk from FOSS4G Bonn here: http://video.foss4g.org/foss4g2016/videos/index.html), but I feel Leaflet still has an edge on that regard.
Also, OL3 depended on the Closure compiler for a long time, which made it difficult to interoperate with other frameworks, which is why a lot of React/Ractive/R/Django/Vue users choose Leaflet.
Other than that, there's no clear obvious advantage of a library over the other one. We have a friendly relationship with the OL3 folks, we try to copy some of their features, they try to copy some of ours, everything gets better in the end.
[1] http://rsmap.net
Performance wise, Leaflet is an order of magnitude faster when it comes to frequent bounds/location updates, speaking for itself. Great work!
I'm interested to know if this doesn't actually violate the google maps terms of service:
https://developers.google.com/maps/terms#10-license-restrict...
10.4(e): No use of Content with a non-Google map. You must not use the Content in a Maps API Implementation that contains a non-Google map.
10.5(f): No incorporating Google software into other software. You will not incorporate any software provided as part of the Service into other software.
I ended up having to clone the repo where the docs were, checkout the commit released for that version and build the docs myself. Maybe I'm spoiled by react-router's phenomenal handling of outdated docs, but it was a pretty terrible experience.
If you're wondering what the project was: I was trying to integrate a Pokemon Gen 2 (G/S/C)-style battle system into a Go style map. Why? because I really wish that Pokemon Go was less disapointing, and G/S/C was a nice middle ground between interesting and incredibly difficult to implement.
But upgrading all my maps to Leaflet 1.0 will take more time, because lots of broken plugins need to be fixed or replaced.
One of my maps for local realtime weather observation for sailing/surfing: http://gis.ee/meri/
For that map Leaflet is perfect, because its lightweight, fast, mobile friendly.
I was doing most of my mapping work in R, but needed something interactive to use for a website and am very pleased with Leaflet so far. If you're interested in mapping I'd definitely try it out (interesting datasets would be city crime data and humanitarian data from here: https://data.humdata.org/).
EDIT: Looks like I can: http://leafletjs.com/examples/crs-simple/crs-simple.html
Is Leaflet the best option for this though? I just want to show an interactive map on the web of a really big PNG I have (much bigger than the one in that example).
1: http://leaflet-extras.github.io/leaflet-providers/preview/ 2: http://pasteboard.co/8bnyEPXGC.png
1. Drawing annotations
There are plugin options but Leaflet editable is quite buggy and convoluted, and leaflet draw is still on 0.7 and we couldn't wait for their 1.0 upgrade.
2. Large image overlays
There is an awkward space between an image that the browser should be able to handle even if it's quite large, and one that requires tiling. We fell into that space and there are some seriously nasty bugs in Chrome when imgs are huge. Since leaflet just uses an <img> tag for overlays this was a killer.
3. Lack of map rotation
There is a fork that implements rotation, but we couldn't rely on that to stay up to date with mainline.
Overall I still really like leaflet and would use it in a heartbeat for any more normal mapping application.
FYI, if you are trying to use this with Webpack and Webpack's css-loader, you'll probably run into the problem noted at https://github.com/Leaflet/Leaflet/issues/4849.
Once we have that, adoption will come in waves. At the moment, nothing beats Google Maps, and their terms require you to use their maps.
Last I checked it wasn't great for autocompletion, and it lacked some important features that Google's has (the "bounds" attribute in the geocoding result, for example, which is super useful if you want to determine the precision of your match), but maybe it's improved since.
https://github.com/Mchl/simplexnoisemapgenerator
There's a link to a demo, but the machine it's running on is not really powerful, so expect poor experience. You'll do a lot better downloading and running the code on your own.
- Flyover animations (zooming and panning in a curve with map.flyTo).
- Fractional zoom level support (map.setZoom(12.34)).
- Much better tile loading algorithm with less flickering.
Seems like a lot of features come straight from Mapbox GL
Their JS file url: https://unpkg.com/leaflet@1.0.0-rc.3/dist/leaflet.js