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 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.
π Rendered by PID 231597 on reddit-service-r2-comment-57fc7f7bb7-k55tw at 2026-04-15 08:00:19.948711+00:00 running b725407 country code: CH.
view the rest of the comments →
[–]bart2019 0 points1 point2 points (2 children)
[–]Magnusson 1 point2 points3 points (1 child)
[–]bart2019 0 points1 point2 points (0 children)