Learning Leaflet


This week I launched http://www.exploringspatial.com to host companion labs for this blog. My first lab is for Leaflet, a JavaScript library for maps. I’m looking for two things from this framework:

  1. The ability for users to pick Google, OSM, or Bing as the base map later.
  2. A vector graphics layer (points and polylines) that is separate from the base map.

This week’s lab, http://www.exploringspatial.com/#demo/1, combines Leaflet’s quick start tutorial with a layer example posted by @james_croft.  James used a TileLayer for Google that he found at http://psha.org.ru/leaflet/Google.js (there are a lot of Leaflet goodies at  http://psha.org.ru/leaflet. I’m working on figuring out who posted them).

In my lab the shapes and click events work fine on the Cloudmade and OSM layers, but not on the Google layer. That is a deal breaker for me, so my next task is to understand why they don’t work with the Google plugin and resolve the problem.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s