Quick and easy D7 distro to evaluate Leaflet

Events happening in the community are now at Drupal community events on www.drupal.org.
cossovich's picture

Hey locators and mappers,

I recently evaluated Leaflet for a Drupal 7 project and it took a little while to figure out the right recipe to get locations with geocoding and mapping. I've coalesced some of that setup and configuration research into a distribution. It's only a sandbox project but I thought it might be useful for others looking to evaluate a Drupal GIS stack that includes:

also in the mix is Leaflet More Maps which adds some other map tiles into the mix.

The project page is here: http://drupal.org/sandbox/cossovich/1764636

I've also made a short screencast to demo a quick installation method using Drush Make: http://www.youtube.com/watch?v=P4lEaFGYA9g

(I've cross-posted to the Sydney group because I thought I might put myself down for a lightning talk about my hike through the Drupal 7 mapping wilderness at next months' meetup)

Comments

Nice one!

rdeboer's picture

Thanks for this lovely intro to Leaflet!

The video has limited scope, as it should, keeping it short and sharp.

A great follow-up video would be to show how to create maps with multiple location markers in Leaflet, as generated from a View (as in the Views module).

Leaflet easily handles thousands of markers on a map and with the Leaflet MarkerCluster module you get a great animated way of visualising these and drilling down into subsequent zoom levels.

Also, you're not limited to Geofield to do the storage of lat/long. See for instance IP Geolocation Views and Maps, which supports Leaflet, Leaflet More Maps and Leaflet MarkerCluster. It also has several map centering options (eg the visitor's current location as retrieved via HTML5) and the notion of a differentiator field, which allows you to colour-code the markers by taxonomy term, content type, any field from the View that the map is based on.

Cheers

cossovich's picture

Thanks for the feedback. I haven't seen those other projects you've mentioned but I like the idea of extending the distribution and adding some more screencasts. I'm loving Leaflet!

Hi, congrats for your job,

xurxosanz's picture

Hi, congrats for your job, it's really interesting

I've tried to download the distro but it fails dowloading the Leaflet patch. See http://pastebin.com/jfw2cnGz at line 63.

I'm using drush and drush-make right from Ubuntu 12.04 packages. What I'm doing wrong?

It's hard to tell from the

cossovich's picture

It's hard to tell from the output. Can you run the drush make command again with the --debug option and paste that output?

Sure http://pastebin.com/Qn3h

xurxosanz's picture

Sure

http://pastebin.com/Qn3hD4tT

Error at line 1262

I think Curl is having a

cossovich's picture

I think Curl is having a problem with the parenthesis in the patch filename. Try installing wget (drush will use wget instead of curl if it's available):

$ apt-get install wget

You can confirm that curl is the problem by running the following:

$ curl -LOD '/tmp/curl-test.txt' 'http://drupal.org/files/[Upgrade_to_LeafletJS_0.4.x]-[1707882].patch'

Don't need patch

rdeboer's picture

You no longer need that patch. It has been applied and is in the current release, 7.x-1.0-beta1.
Rik

I'll update the make file

cossovich's picture

I'll update the make file accordingly.

Strange. I have wget

xurxosanz's picture

Strange. I have wget installed but drush is not using it at all. I've tried to download the file using wget and works but with curl is failing

http://img6.imagebanana.com/img/pdoch7et/20120913091738Seleccin.png

:-/

Try again now

cossovich's picture

I've updated the profile to use the latest recommended release of Leaflet (so that patch isn't necessary). You shouldn't have the curl issues now.

Hello cossovich, Thanks for

Sinan Erdem's picture

Hello cossovich,

Thanks for the info. Can you please briefly explain how and why you are using Geocoder module? And how do you get user's input of location?

Location and Mapping

Group organizers

Group categories

Wiki type

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week