Live data from Hacker News

LeafletJS: a JavaScript library for interactive maps

leafletjs.com

21–30 of 91 posts

Re: LeafletJS: a JavaScript library for interactive maps

#21
I used leaflet for a previous project involving maps of users (https://tagmap.io/tag/slatestarcodex is an example of one), and my experience with it was wonderful; I'd be happy to use it again next time the need arises. The best part about it for me was perhaps how easily configurable it is, including easily adding additional plugins (for example, we used one called MarkerCluster to cluster markers for users if there were hundreds or thousands in the same area. Changing the style of markers, adding new ones, and so on, was also trivial). Nice library and experience in general.

Re: LeafletJS: a JavaScript library for interactive maps

#22
LeafletJS is great! I've been using it successfully with multiple tile layers and a few additional plugins as well (such as leaflet-ruler[0] and RotatedMarker[1]) as the foundation for the map display in my virtual sailing project. Here's a sample of what that looks like: https://i.postimg.cc/8z7DMz3T/leaflet-sample.png

[0] https://github.com/gokertanrisever/leaflet-ruler

[1] https://github.com/bbecquet/Leaflet.RotatedMarker

Re: LeafletJS: a JavaScript library for interactive maps

#23

I have used this and it is excellent. It is a tremendous alternative to all the paid GIS/mapping suites.

I've used it and it's nice for use cases that match very closely to what they support and provide documentation/examples for. As a quick drop-in map widget on a web page, it's quite nice. I've also used Mapbox which provides a much fancier OpenGL map with fancy things like continuous (smooth) zoom levels. Mapbox feels a lot more like a modern Google Maps-esque mapping widget. https://docs.mapbox.com/mapbox-gl-js/exam…

FYI: MapLibre is a fork of the last version of MapBoxGL that did not require payment/registration even if you don't use mapbox tiles.

Re: LeafletJS: a JavaScript library for interactive maps

#25
I’ve used Leaflet a ton and love it. But I recently tried using it with a vector-based render method (as opposed to the rastered tiles Leaflet uses by default) and couldn’t find anything that worked anywhere near as easily and simply as Leaflet’s standard rendering.

I don’t blame the Leaflet folks for this really, rendering map data locally via WebGL is not a simple task. But it’s been depressing to see folks like MapBox close off their vector-based library (and Google’s isn’t open either). There’s an open source of Mapbox’s library but it still feels like the open source world is being left out in the cold compared to how things were just a few years ago.

Re: LeafletJS: a JavaScript library for interactive maps

#26

I have used this and it is excellent. It is a tremendous alternative to all the paid GIS/mapping suites.

You will pretty much always have to pay for the tileserver service though. The main benefit I saw was that you could trivially switch to any other tile service without being tied in to a particular one like if you used the google maps library.

Depending on the use case, you may be able to host tiles on any web host/cdn

Re: LeafletJS: a JavaScript library for interactive maps

#27

Earlier quoted context omitted.

You will pretty much always have to pay for the tileserver service though. The main benefit I saw was that you could trivially switch to any other tile service without being tied in to a particular one like if you used the google maps library.

Depending on the use case, you may be able to host tiles on any web host/cdn

You still have to pay for the server you host it yourself on. Which usually means generating the tiles from scratch rather than relying on some precached ones. The prices for something like mapbox are not outrageous for what they provide.

Re: LeafletJS: a JavaScript library for interactive maps

#29
post #25

I’ve used Leaflet a ton and love it. But I recently tried using it with a vector-based render method (as opposed to the rastered tiles Leaflet uses by default) and couldn’t find anything that worked anywhere near as easily and simply as Leaflet’s standard rendering. I don’t blame the Leaflet folks for this really, rendering map data locally via WebGL is not a simple task. But it’s been depressing to see folks like Ma…

Have you looked into OpenLayers? Maybe this is something that could be useful: https://openlayers.org/en/latest/apidoc/module-ol_layer_Vect...

Re: LeafletJS: a JavaScript library for interactive maps

#30
In a previous life I used Leaflet in some digital art-history publications for the Getty Museum in LA [1]. Leaflet was the MVP of our static-website software stack ("JAMstack" before that was a thing). We used Leaflet to provide maps of the Roman Empire as well as deep-zoom functionality for images of artwork. The library is a gem of open-source web technology, versatile and reliable.

[1] https://www.getty.edu/publications/romanmosaics/

Post reply on HN