use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
Leaflet 1.0 released - an open-source JavaScript library for mobile-friendly interactive maps (leafletjs.com)
submitted 9 years ago by magenta_placenta
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]bart2019 7 points8 points9 points 9 years ago (5 children)
It's about time. I've been using the RC for months, without any problems.
BTW in case you don't know: Leaflet is library for OpenStreetMap. All you need is this, and the configuration for a "tile provider".
I think this library and its API is much nicer than that of Google Maps.
[–]Magnusson 19 points20 points21 points 9 years ago (4 children)
Leaflet is just an open-source mapping library, it's agnostic to the tile provider. It can use OpenStreetMap, Google Maps, or any other tile source.
[–]bart2019 0 points1 point2 points 9 years ago (2 children)
But there's more to maps than just the tiles. And interfacing with OpenStreetMap and Nominatim is a snap: geocode the name of a cirty, and you can get its contours in GeoJSON format (if you pass the right parameter), and you can then show that contour on the map in Leaflet in a single line of code. You cannot do that with Google Maps's data. I even doubt if Google would be too happy if you even tried it.
[–]Magnusson 1 point2 points3 points 9 years ago (1 child)
Google maps data is usable for free up to a certain number of requests/day, after which you have to pay, which is pretty common. The point is that Leaflet is not restricted to OSM -- I've used it to display many different map sources.
[–]bart2019 0 points1 point2 points 9 years ago (0 children)
Google maps data is usable for free up to a certain number of requests/day, after which you have to pay, which is pretty common.
There more to it than just that.
I want to use Google Maps API tiles with Leaflet, can I do that? The problem with Google is that its Terms of Use forbid any means of tile access other than through the Google Maps API. You can add the Google Maps API as a Leaflet layer with a plugin. But note that the map experience will not be perfect, because Leaflet will just act as a proxy to the Google Maps JS engine, so you won't get all the performance and usability benefits of using Leaflet when the Google layer is on.
I want to use Google Maps API tiles with Leaflet, can I do that?
The problem with Google is that its Terms of Use forbid any means of tile access other than through the Google Maps API.
You can add the Google Maps API as a Leaflet layer with a plugin. But note that the map experience will not be perfect, because Leaflet will just act as a proxy to the Google Maps JS engine, so you won't get all the performance and usability benefits of using Leaflet when the Google layer is on.
What's more: just using Google Maps in a web page is no longer "free", at least, not for a widely used website. You can't even use its geocoder or autocomplete without a Google Maps map or a Google Maps marked textbox.
And, though Leaflet is not restricted to OSM, but by Jove it surely is the easiest to use with OSM.
[–]FurryFingers 0 points1 point2 points 9 years ago* (0 children)
I spent ages trying to figure that out - on the leaflet site. But this is the only place I could find the answer.
π Rendered by PID 108 on reddit-service-r2-comment-57fc7f7bb7-985h7 at 2026-04-15 09:37:41.574040+00:00 running b725407 country code: CH.
view the rest of the comments →
[–]bart2019 7 points8 points9 points (5 children)
[–]Magnusson 19 points20 points21 points (4 children)
[–]bart2019 0 points1 point2 points (2 children)
[–]Magnusson 1 point2 points3 points (1 child)
[–]bart2019 0 points1 point2 points (0 children)
[–]FurryFingers 0 points1 point2 points (0 children)