Screencast: Drupal Mashup Machine

Watch this screencast to learn how to use Drupal to create Google Maps mashups of virtually any arbitrary data or content with no coding in minutes. For the example shown in this screencast I took a csv file of crime data provided by the San Francisco government and turned it into a usable google maps mashup in about 10 minutes.


14 minutes / 60megs

To play along at home you will need to install the following:

Please feel free to leave any comments, questions, or feedback.

Comments

Drupal or what ever his

Drupal or what ever his organizations name is, was not the first person or business to implement a "Doha Map" on the web. If you will view the link which I will provide at the end of this message you will notice that there is another "Doha Map" out on the web and was released with affective promotion and marketing stragtegy compared to the computers

The purpose of this message is to stop Drupal and his organization from releasing false information regarding the "First Doha Map" in Qatar. Please view the link below so that you can judge who was the first one to release "Doha Map" and which "Doha Map" you would prefer to use!

www.dohamap.info (this is just a beta version, newer version with new updates is on the way)

Thank you for your time and consideration

Is it possible to change the date to something easier to read?

Is it possible to change the date to something easier to read? http://www.tinemuller.dk/drupal/Crime look in InfoWindow Date: 20070328T07:03:00

Is this correct done? Can't figure out how to make the View

I have been struggling to make this project because all the modules are very old in the video but have I done it right here http://www.tinemuller.dk/drupal/? Scroll down a little to see the crime info.

Maybe someone could tell me how to make the View if it's correct done until now?

Wish someone would make an updated video, please.

Is this tutorial still functioning with the Modules?

I have been looking for such a tutorial for a long time. But before I use a lot of time I want to know if it's still working? Don't you have the map online anymore? Can't find it.

Gmap link...

So, I've been looking to do exactly what you made here, and it's been a great help.

My only question is, what module creates that "GOOGLE MAP LINK" that I see on ur node? I thought I installed everything that was needed, but maybe I didn't? I can't get everything you have done, with that exception, which prevents the map view to show properly.

Any help would be greatly appreciated.

Offtopic, but crime-data?!

Offtopic, but crime-data?!

gmap

I'm trying to something seemingly easy but it appears to be an uphill battle for me.

1. I have created a content type called Map
2. I made sure I could use the location feature in the content type and I enabled it to input the regular address part
3. When I try it out, I put in the values of an address and then submit it but I don't see a google map, instead I see a link to google map
4. I created a view, with gmap:view and added the required fields of long and lat (not sure why you have to add this because I don't want it to be displayed)
5. I review the view but to my dismay, it only displays a map of USA as set in the gmap configuration with no markers what so ever.
6. I continue to pull my hair out, bit by bit but that doesn't help.

I posted this here because you guys seem to have this whole thing pegged and seem to understand it in detail. Hoping for some assistance.

Regards,
Chris W

User submitted map

I volunteer for Krishna.com's Connect page http://connect.krishna.com which is run on Drupal. We have a Frappr map on the home page but it does not seem to work so well. We have a profile and forums section and it would be nice to have something that works with the data that is given in the profiles.
Also the problem with the Frappr map is that there seems to be a limit on the number of profile points they will show on the map. As new profile sign in, old ones are erased off the map. I really liked your video, but do you have any suggestions for a user submitted map like frappr module that works with drupal. Photos are nice to add as well. Thank you for any help that you can offer. Thanks
ys
-Chandra

I am looking for the

I am looking for the opportunity to improve the performance for drupal. Thanks for tips.

Missing the Location for create content

I've been following the mash-up and it was going well...until I went to create content. I've checked the location info in admin>> settings >> content types and the locative information is there. But, There is no location info below the fields when I check the create content area.

What am I missing? I've got all the modules in correctly.

thanks,

B.

P.S. I don't have a date field type when I add fields to admin >> content >> 'crime' , did I miss a CCK add-on?

Got It working. The location

Got It working. The location module required the mapping to the lat and long be in the location field. I missed that. Also, I had my lat and long backwards and found my markers in Antarctica until I fixed that.

I'm going to try this in my 5.x sandbox next, I'll post the results of my testing.

Drupal 5.x gmap mashup

Drupal 5.x gmap mashup works. You have to look for some of the 4.x settings in the 5.x env. but, it does work with a little patience.

Drupal 5?

Thank you for your work on this tutorial.

I believe I followed directions working with 5 but my map isn't showing. I'm scratching my head. I'm developing a site for a fledgling SF non-profit with limited funds. Do you have any time time to walk me through the process a little?

I appreciate your consideration, Erika

Did you use Gmap View from

Did you use Gmap View from the pick list? I found that in my 4.7 install that the list view did just that, list. If you watch the mashup, it doesn't have a Gmap option, they must have added that in a newer CCK. Also, have you enabled the location for users in the location module? It also looks a little different in the 4.7 test I did.

Hope this helps,

Didn't work for me either.

I couldn't get this to work either I was going to use it on my Reverse Cell Lookup site. Any help would be greatly appreciated. Thank you!

So do i, any help to solve

So do i, any help to solve it? What a bore!

What modules are you using?

To get this working w. 5.0 you should be able to use location module to geocode w/ Google API and use views + gmap module to display results on a map. What issues are you running into?

Cool stuff. Where did you

Cool stuff. Where did you get that CSV from?

Great stuff...

Missing the gmap_view, which was incorporated later, but this is one of the simplest tutorials I've seen yet showing the power of Drupal.

Excellent work.

super! for drupal 5?

this is awesome, just what I was looking for - except I'm working in Drupal 5 and there seem to be at least some differences. I'll have to go through it again start to finish - haven't got it working yet. Also is there a particular format that latitude and longitude need to be in?

thanks!

Dont understand these Macros

Generally greeat, but:

Don't quite understand where to put these Macros....

Also how would Drupal know to apply it.

Does it work without latitude/long..tude? (With addresses)
(For now I am forced to supply some values, and I supply 0.0).

Thanks
Olav Benum

Can you help me??

Dear Zacker:

I see the Mashup Machine and use drupal 4.7.6+views+gmap+location to creat map
=>http://www.twmaps.com/petmap/?q=crimemap

but i can't get the result like it in Mashup Machine!!

can u give some suggestions to solve this problem!!

thanks!!

House Plants Weary of GMap and Location Talk...

I can recite your podcast from memory -- have been to my plants, I think....

Can you help?

All's in order: csv (with long and lat), check, gmap-locations-views modules, check, content type matches up and csv import's fine.... still, no "see map" link, even though there's long and lat in "location info" in individual nodes... doesn't seem to be pulling the map info off the long and lat. (there's data in the location info on the node level, but no map in location although lat and long are present... I can zoom until "you're too close" prints to screen....)

I know, you've been the go to guy for this for (too long), but do you have any ideas? Please, I think my plants are getting tired of hearing about field types and views.... and I'm becoming a vegetable.

Thanks A LOT for all your indispensible info.

Re: Screencast: Drupal Mashup Machine

Here's a poser for you:

What out of the box modules could you use to modify the crimemap to display the full map in a left side panel, and then, on click, the content of a particular crime node in a right hand panel?

Re: Screencast: Drupal Mashup Machine

Great tutorial and really easy to follow. All is working fine and dandy except the markers and information bubble are distorted;

http://www.salmoncatch.bettysite.co.uk/index.php?q=catchstats

Have I missed something - or do you have any tips on how I can get them to display correctly?

Thanks for making it straightforward so far!

Re: Screencast: Drupal Mashup Machine

Hrrmm.... This looks like a problem with gmaps module. Have you tried using gmaps module to make a map outside of views?

Re: Screencast: Drupal Mashup Machine

Thanks so much for this great tutorial (and for submitting your code to views and/or gmaps module). After watching it, I made my own mashup of authentic Mexican restaurants in Vancouver.

Re: Screencast: Drupal Mashup Machine

Do you have one or can create one about Views module. I'm confused about views module and what it can do. Thanks in advance.

Re: Screencast: Drupal Mashup Machine

Wow ... this is very impressive !!

Re: Screencast: Drupal Mashup Machine

Great demo of great facilities, but can one make this 'live', ie can one make a mashup using date off a particular url, rather than from a file as in the example?

thanks

Re: Screencast: Drupal Mashup Machine

You should check out our website. www.geocrimes.com We are pulling data from other websites like http://www.sanantonio.gov/saPD/DATA/centdata0906.htm and digesting it into our site using some simple php, custom drupal node type, and the PEAR PHP HTML_Sax library. I would give you a link to a specific example but we are doing so much testing on our live site that it may not be valid for long. Once you get to our site click on the SA Crime Map. The map is really hard to use and not very practical at the moment, but we are still in testing and creating phase. If you want more information you can email me at matt at paretech dot com.

-Matt

Re: Screencast: Drupal Mashup Machine

This would take some engineering work.

Re: Screencast: Drupal Mashup Machine

I'm having trouble finding the node_import module that will work with Drupal 4.7.3. Can anyone tell me where to look?

Thanks!

Re: Screencast: Drupal Mashup Machine

I have managed to get the system running on my site but you mention that the theme will handle the display of the map. Am I using the wrong theme? or have I missed something fundamental? I would really appreciate any help ... this is a great tutorial.

http://www.discovercumbria.info/mappy

Re: Screencast: Drupal Mashup Machine

I'm also confused about the theme used in this example. How should we modify our theme to make it display the list view as a google map?

Re: Screencast: Drupal Mashup Machine

Glad to read such a nice piece of information.

Re: Screencast: Drupal Mashup Machine

Did anyone have nayluck on getting this to work with some of the newer versions of the modules? I am having trouble with the node import module and the locations module. If anyone has updated instructions it would be greatly appreciated.

Re: Screencast: Drupal Mashup Machine

Since I haven't been able to get this method to work, I tried:

CivicSpace (clean) + editing settings.php file to add support for mapping. Currently set to use my Google API key + geocoder.us lookups.

Added two sample organizations, with street addresses.

Geocoder.us lookups worked perfectly, both can now be individually mapped in CiviCRM.

In CiviCRM, advanced search allows me to select both organization entries (checkboxes) and drop down the menu next to the "Print" button to select "Map Contacts". Clicking the "Go" button brings up a mashup showing both contacts.

Pros and Cons of doing this vs. the method in the screencast?

How would I create a publicly viewable link to a map mashup using this method?

Your method had the ability to filter by field (awesome)...I'm assuming the same functionality should work easily in CiviCRM?

Dave.

Re: Screencast: Drupal Mashup Machine

I've been trying to figure out a similar process for a while. I tried following the screencast, but after installing CCK and enabling all the new data types / modules, I end up seeing only "text" as a possible field type. Under admin->content I only see "content types" as a submenu option, not content type settings. No integer form available, even after enabling the "content", "number" and "option" modules.

Thoughts? Drupal 4.7 + CiviCRM.

Dave.

Re: Screencast: Drupal Mashup Machine

Ok, so I solved one of my problems...starting to create a custom content type and then enabling new modules under cck doesn't work. You'll just never be able to add those field types to the custom content type you'd created previously.

Recreating content type from scratch worked.

But...I still don't have a Content Type Settings option on my navigation menu. Not sure how to proceed without it, so I'm stuck again. Suggestions welcome, if anyone's awake...

Re: Screencast: Drupal Mashup Machine

Ok, so latest CVS of CCK does things a little differently: The locative information isn't set in the "Content Type Settings" menu option. Now you click on Admin -> Settings -> Content Types. You should see a list of the content types you have available, including any custom ones you just created. Then click on "configure" and look for the "locative" collapsed menu near the top of the list (it was the first thing under the content type title, for me).

Dave.

Re: Screencast: Drupal Mashup Machine

Still not working. After much work and a billion errors, I'm stuck with:

"Fatal error: Call to undefined function: _content_types() in /home/digital/domains/davesguides.com/public_html/modules/node_import/import_content.inc on line 9"

When I try to use import. I'm trying the CVS version of import, since there isn't a 4.7 version listed (which version did you use, Zack?), with legacy handlers enabled in case it made a difference.

Last for the night...I'll wait for some feedback / advice.

Re: Screencast: Drupal Mashup Machine

I used this version:

$Id: node_import.module,v 1.22 2006/04/29 11:40:15 dado Exp $

Re: Screencast: Drupal Mashup Machine

I got around the Node Import difficulty by creating two nodes manually, with the intention of seeing if I could get them to both show up on one map.

My map page:

* user warning: Table 'digital_i258dru.node_' doesn't exist query: SELECT count(node.nid) FROM node node LEFT JOIN node_ node_data_field_ctc_name ON node.vid = node_data_field_ctc_name.vid LEFT JOIN node_content_ctc node_data_field_courses ON node.vid = node_data_field_courses.vid LEFT JOIN node_field_weburl_data node_field_weburl_data_field_website ON node.vid = node_field_weburl_data_field_website.vid AND node_field_weburl_data_field_website.field_name = 'field_website' in /home/digital/domains/davesguides.com/public_html/includes/database.mysql.inc on line 120.
* user warning: Table 'digital_i258dru.node_' doesn't exist query: SELECT node.nid, node.title AS node_title, node.changed AS node_changed, node_data_field_ctc_name.field_ctc_name_value AS node_data_field_ctc_name_field_ctc_name_value, node_data_field_courses.field_courses_value AS node_data_field_courses_field_courses_value, node_field_weburl_data_field_website.field_weburl AS node_field_weburl_data_field_website_field_weburl FROM node node LEFT JOIN node_ node_data_field_ctc_name ON node.vid = node_data_field_ctc_name.vid LEFT JOIN node_content_ctc node_data_field_courses ON node.vid = node_data_field_courses.vid LEFT JOIN node_field_weburl_data node_field_weburl_data_field_website ON node.vid = node_field_weburl_data_field_website.vid AND node_field_weburl_data_field_website.field_name = 'field_website' LIMIT 0, 99999 in /home/digital/domains/davesguides.com/public_html/includes/database.mysql.inc on line 120.

Looks like the views module can't grab the fields from my custom content type. I also noticed that I don't have the option to select location module fields (street, state, city, etc) in views.

D.

Re: Screencast: Drupal Mashup Machine

Get location_views module to be able to make use of the location fields with views. CCK should support this as well, but is very much in flux.

Re: Screencast: Drupal Mashup Machine

Dude. This demo rocks like plate tektonics!

Re: Screencast: Drupal Mashup Machine

How do I center the map where I want it? is there somewhere to enter a gmap macro?

This is very slick thanks for a great demo.

Re: Screencast: Drupal Mashup Machine

Having some problems with the node import module. The lastest one that I can find is for Drupal 4.6 and it throws an error when I tried to access the node import page. The error is "Fatal error: Call to undefined function: form_file() in /home/.maliboo/.../modules/node_import/node_import.module on line 58". Any idea?

Re: Screencast: Drupal Mashup Machine

Any one ever find a fix for this error?

. The error is "Fatal error: Call to undefined function: form_file() in /home/.maliboo/.../modules/node_import/node_import.module on line 58". Any idea?

i'm having the exact same issue.

Thanks in advance.

dt

Re: Screencast: Drupal Mashup Machine

Great. Drupal is powerful but not necessarily intuitive. These kind of tutorials are really helpful for newbees as me. Keep up the good work. Thanks.

Re: Screencast: Drupal Mashup Machine

Excellent - thank you very much!

Re: Screencast: Drupal Mashup Machine

Awesome demo. I learned alot about Views along with gmap. I was able to successfully duplicate what you did on the demo, except for entering the value of the "Nodes to display" in page settings for the View I created. Using the 4.7 version of Views the "Nodes to display" field is limited to two digits. So rather than being able to enter 400 as you did in the demo, I couldn't get past 99. Which version of Views were you using that permitted you to enter a three digit value?

CCK and node_import clashing?

Not sure what's happening here, but my CVS versions of CCK and node_import just don't seem to want to talk to each other?? The CCK content type "crime" is not visible in the node_import dropdown box?

If anyone could shed any light on this for me, I'd really appreciate it!

http://drupal.org/node/65278

Re: Screencast: Drupal Mashup Machine

(Regarding my previous comment)

The CCK Scalar Array bug I mentioned has been patched now:
http://drupal.org/node/64905

Re: Screencast: Drupal Mashup Machine

Hey thanks for this great videocast Zacker!

Just a heads up to anyone trying this for the first time, I was also installing the CCK module etc for the first time, and found that when trying to add a new content type, I hit 4 errors "Cannot use a scalar value as an array..."

It's been reported and confirmed here -
http://drupal.org/node/64905

I'm looking foward to when this is fixed, because following video guides like this is my favorite way to learn to do neat tricks!

How would I go about finding the previous known good CCK module?

cheers

Re: Screencast: Drupal Mashup Machine

On my Windoze XP with QuickTime 7.1 I got no audio. Any clues?

Re: Screencast: Drupal Mashup Machine

Try now

Re: Screencast: Drupal Mashup Machine

I followed the screencast and the instructions found here, but didn't manage to get a map out of the list view. :\

I get the default list view of my location-enabled nodes, but as soon as i add the above snippet in my template.php file, i get only the title of the view and the rest of the page is blank..

Is anyone else experiencing this?!

I am on Drupal 4.7 and most recent versions of Views, GMap and Location.

Other GMap macros do work!

Any help apreciated

Re: Screencast: Drupal Mashup Machine

Really enjoyed the screencast. Real examples are the best way to learn drupal. I have a couple of question after trying to duplicate your example.
1) how did you get the date field in CCK? I can't find it in the version I tried.
2) It looks like you have to get a google maps key. Any advice on that process?

Re: Screencast: Drupal Mashup Machine

You get the google maps API key from

http://www.google.com/api/maps/

enter your domain name and it will generate the code

To get the date field in CCK you must enable the module named date.

Re: Screencast: Drupal Mashup Machine

you might have to download the 'date module' for cck as it's not in the default installation. (which is pretty damn annoying since date is pretty important a native data type for most databases) get it here

Re: Screencast: Drupal Mashup Machine

Great work, really a clever application of these tools. I did run into a problem though when running this on php4.x: it seems that gmap_parse_macro doesn't work quite right and this results in numerical IDs being used as variables... there was rioting in the streets and everything... anyway, the quick fix I'm using can be slipped into your phptemplate function:

under
$thismap = gmap_parse_macro('[gmap|id=viewmap|center=37,-100|zoom=3|width=100%|height=400px]');

add
$thisma['id']='viewmap';

and everything will work pleasantly for the luddites.

Re: Screencast: Drupal Mashup Machine

That was so rad I peed a little.

Re: Screencast: Drupal Mashup Machine

Red Robot + Droop == The Ultimate Robo-Mashup!

Fantastic!!

Thanks for the videocast! It's really great to see the possibilities of using Drupal and even better to learn how to implement them.

Re: Screencast: Drupal Mashup Machine

Fantastic tutorial. I followed the tutorial and managed it.

One question: how to make different gmap views? For example, how to create different views for crimes in different cities?

fantastic?

what is fantiastic? please!