Live data from Hacker News

Leaflet: An open-source JavaScript library for mobile-friendly interactive maps

leafletjs.com

31–40 of 78 posts

Re: Leaflet: An open-source JavaScript library for mobile-friendly interactive maps

#31
Here are three things I'd like to do with Leaflet, or generally just have from an online mapping tool:

1. Use WebTorrent[1] as the tile provider (would probably need a canonical WebTorrent server so that all tiles would always have at least one seeder).

2. A Progressive Web Map (teehee) so that users can store tiles offline and use the mapping service while offline. Obviously not a new concept but AFAIK there isn't a map provider that does it in the browser.

3. Client-side routing/navigation. This could start as a simple Dijkstra in JavaScript (like is demonstrated in [2]), but maybe could be made more powerful and capable soon with WebAssembly.

Is anybody working on these sorts of things? Is anybody interested in them? I've heard of peermaps[3] but it hasn't been updated in over 6 months. I'd be interested in contributing or teaming up with others on these sorts of things.

[1] https://webtorrent.io/

[2] https://christophercliff.com/dijkstra/

[3] https://peermaps.github.io/

Re: Leaflet: An open-source JavaScript library for mobile-friendly interactive maps

#32
post #31

Here are three things I'd like to do with Leaflet, or generally just have from an online mapping tool: 1. Use WebTorrent[1] as the tile provider (would probably need a canonical WebTorrent server so that all tiles would always have at least one seeder). 2. A Progressive Web Map (teehee) so that users can store tiles offline and use the mapping service while offline. Obviously not a new concept but AFAIK there isn't a…

Service Workers can cache map tiles, if you need a quick solution that works in Chrome and Firefox at least.

Re: Leaflet: An open-source JavaScript library for mobile-friendly interactive maps

#33
Yes Leaflet is just awesome. Vlad (Mourner) and the other contributors have done an amazing job at keeping focused on making leaflet super lightweight and really easy to use.

The stuff they are doing with MapBox is super awesome as well, especially the OpenGL work.

Deeply appreciate the effort.

Re: Leaflet: An open-source JavaScript library for mobile-friendly interactive maps

#34
post #17

One of my favorite tricks with leaflet is to tie into the ontileload event. You can index your data by tile id or quadkey and seamlessly load your data in for the specific data that is in view.

Oh that is a really good tip! Good one. Do you have a demo?

Re: Leaflet: An open-source JavaScript library for mobile-friendly interactive maps

#35
post #5

In my experience the best thing about Leaflet is the possibility of using CSS to style, transform and animate markers. Shameless plug, see for instance this map using css 'explosions': https://citybik.es

Really cool, love it!

Is there an open data feed for this stuff then? I love open data, there is so much available now.

Re: Leaflet: An open-source JavaScript library for mobile-friendly interactive maps

#37
post #5

In my experience the best thing about Leaflet is the possibility of using CSS to style, transform and animate markers. Shameless plug, see for instance this map using css 'explosions': https://citybik.es

Really cool, love it!

Is there an open data feed for this stuff then? I love open data, there is so much available now.

Re: Leaflet: An open-source JavaScript library for mobile-friendly interactive maps

#38
post #34
post #17

One of my favorite tricks with leaflet is to tie into the ontileload event. You can index your data by tile id or quadkey and seamlessly load your data in for the specific data that is in view.

Oh that is a really good tip! Good one. Do you have a demo?

Here's a screencast of a side project that used that technique. The top artists are bound to quadkeys and are loaded via the ontileload event via a websocket. Going to get back into some map work in the next few months and might write out a blog post about this technique.

https://drive.google.com/file/d/0BwPUV--rEjyiVDc4UXBzUnhhMDA...

Re: Leaflet: An open-source JavaScript library for mobile-friendly interactive maps

#39
I made a Scala.js facade of this recently for my work :) It's still not _completely_ done, but covers alot of the API. If anyone's interested in Scala on the front end and would like to check it out - https://github.com/cibotech/leaflet-facade

Most of the stuff I saw online was for previous versions of Leaflet, I wanted to make something that uses this new release

Re: Leaflet: An open-source JavaScript library for mobile-friendly interactive maps

#40
post #31

Here are three things I'd like to do with Leaflet, or generally just have from an online mapping tool: 1. Use WebTorrent[1] as the tile provider (would probably need a canonical WebTorrent server so that all tiles would always have at least one seeder). 2. A Progressive Web Map (teehee) so that users can store tiles offline and use the mapping service while offline. Obviously not a new concept but AFAIK there isn't a…

For offline mapping, it's best to use vector rather than bitmap tiles. Look at the ecosystem around Mapbox GL (which is open source).
Post reply on HN