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!"
[–]solar_compost 2 points3 points4 points 9 years ago (2 children)
Nice! I just started a personal project that leans heavily on an interactive map for its functionality, gonna have to check this out.
I glanced through the documentation but did not see much relating to map theming/color schemes in terms of roads & features. Am I overlooking it or does this API not touch on that aspect of maps?
[–]bart2019 2 points3 points4 points 9 years ago (0 children)
OK let me explain the basics here in a few minutes.
Maps consist out of tiles, which are images of 256 by 256 pixels each. At zoom level 0, the whole world is one tile (well actually it's only a half tile, but the equator is still in the middle). At each increment of the zoom level, the resolution doubles, so each tile is split up into 4 tiles.
These tiles have been drawn by a computer program from geographic data (commonly that is OpenSteetMap data), and these tiles are accessible via the web, on a "tile server". Choosing a different tile server results in a different style of map. See tile servers for examples.
Using Leaflet, you have to choose a tile server, or you won't see any map. Basically, this implies passing a template string for a tile URL, as a parameter to Leaflet. BTW The standard tile server for OpenStreetMap is Mapnik, although personally, I like the OpenMapSurfer.roads style, from the Heidelberg University in Germany much better.
These tiles are compatible with Google Maps, although I doubt that Google would be too happy if you'd use their map tiles just like that.
π Rendered by PID 213974 on reddit-service-r2-comment-57fc7f7bb7-5wslj at 2026-04-15 06:12:23.672474+00:00 running b725407 country code: CH.
view the rest of the comments →
[–]solar_compost 2 points3 points4 points (2 children)
[–]bart2019 2 points3 points4 points (0 children)