News for hackers. Stuff that matters.
Re:Leaflet: An open-source JavaScript library for mobile-fri... by mourner on Saturday December 03, 2016 @04:40PM (#13097636)
Leaflet author here. Thanks for the kind words everyone! A few core developers are here too. Ask us anything. :)
Re:Leaflet: An open-source JavaScript library for mobile-fri... by mickael-kerjean on Saturday December 03, 2016 @09:04PM (#13098439)
Any plan to support webgl in the future as mapbox gl does?

From a user perspective the difference is huge

Re:Leaflet: An open-source JavaScript library for mobile-fri... by mourner on Sunday December 04, 2016 @04:32AM (#13099388)
WebGL is notoriously hard to use and requires tons of code for even simple things like drawing lines and polygons. (Disclaimer: I'm also one of the core developers of Mapbox GL JS)

One of our core devs (Ivan) works on Leaflet WebGL renderer, but I'd like it to remain a plugin, so that Leaflet stays true to its goal — to be as small and simple as possible.

Re:Leaflet: An open-source JavaScript library for mobile-fri... by ivansanchez on Sunday December 04, 2016 @11:27AM (#13100457)
Indeed! From my point of view, WebGL rendering for Leaflet makes sense, but it's very important to not remove support for browsers which don't implement WebGL right now.

MapboxGL is very performant, but it changes all the abstractions to the map elements, which is something I'm particularly not very happy with. Thus Leaflet.GL.

Re:Leaflet: An open-source JavaScript library for mobile-fri... by abustamam on Sunday December 04, 2016 @04:34PM (#13101889)
I really appreciate the work you do! It's great to be out of Google's ecosystem for this, as it is not extensible enough for my needs.

Is there any plan to add NPM support anytime soon? I tried using the NPM library but icons did not work (got invalid path error) so I was forced to use div icons.

The leaflet/npm ecosystem goes out the window when you take into account plug-ins as well, As they require script tags.

Thanks for all your hard work!

Re:Leaflet: An open-source JavaScript library for mobile-fri... by mourner on Monday December 05, 2016 @06:47AM (#13104803)
If the icons don't work when you use Leaflet through NPM, please report a bug at https://github.com/Leaflet/Leaflet/issues. This is certainly not an expected behavior. It might have regressed in recent versions.
Re:Leaflet: An open-source JavaScript library for mobile-fri... by abustamam on Monday December 05, 2016 @08:36PM (#13111570)
I actually got it to work using DivIcons, but I felt it was kind of hacky (it was a div containing an image with a url to my marker).

Interestingly enough, the bug I was getting (can't seem to repro anymore) was already solved... by you! https://github.com/Leaflet/Leaflet/issues/766#issuecomment-7...

None of the fixes on that page worked, but using DivIcons did. If I can repro, I will definitely make an issue. Thanks!

Re:Leaflet: An open-source JavaScript library for mobile-fri... by riledhel on Saturday December 03, 2016 @05:20PM (#13097781)
Thanks so much for an amazing work. You guys certainly did mine much easier!
Re:Leaflet: An open-source JavaScript library for mobile-fri... by inputdev on Sunday December 04, 2016 @05:38AM (#13099519)
I just want to say that I have been using leaflet for visualizing datasets and appreciate your efforts.
Re:Leaflet: An open-source JavaScript library for mobile-fri... by socmag on Saturday December 03, 2016 @07:19PM (#13098153)
Hey, again great stuff.

I have a small question while you are here...

In my application, when a user zooms the map.. the tiles and markers seem to get get zoomed at different rates, then finally snap back together at the end of the zoom.

Is this something I'm doing wrong. Is there anyway to mitigate that effect?

Thanks again.

Re:Leaflet: An open-source JavaScript library for mobile-fri... by mourner on Sunday December 04, 2016 @04:33AM (#13099389)
Does this effect happen on the Leaflet frontpage example? You could be using an older version Leaflet CSS with a newer version JS.
Re:Leaflet: An open-source JavaScript library for mobile-fri... by socmag on Wednesday December 07, 2016 @08:47AM (#13122441)
Hey @mourner... so it works great with pinch zoom. Still have the same issue if using the mouse wheel to zoom. Just FYI.
Re:Leaflet: An open-source JavaScript library for mobile-fri... by socmag on Monday December 05, 2016 @08:06AM (#13105079)
The CSS wasn't mismatched, but I've upgraded to the latest leaflet and now it works super. Thanks!
Re:Leaflet: An open-source JavaScript library for mobile-fri... by socmag on Sunday December 04, 2016 @05:09PM (#13102044)
Ah maybe.. I will double check and report back. Thanks a lot for the suggestion!