Event content type, Locations, and GMap

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

I am trying to create a map of node locations, but only for nodes of type Event and Event with Volunteer Timeslots. I've got Location and GMap configured with the API key in all the right places. I'm using the latest dev releases of these modules.

However, when I create a new event node with location data, no geocoding occurs. If I query the location table, I can see my node with the correct location, but the latitude and longitude fields are null.

I looked at location.module in the location_nodeapi() function. Around line 842, I see:

<?php
case 'insert':
?>

and no code to handle this case. Should there be?

Do I need to plug in some code from elsewhere to get all this working?

Comments

No

michelle's picture

That just means it runs the same code as " case 'update':".

Location works but there are several settings pages and you have to make sure everything is set up everywhere. You have to tell it that you're using Google's API on two different pages, IIRC. Make sure you've hit all the pages and looked at all the options.

Michelle


See my Drupal articles and tutorials or come check out life in the Coulee Region.

Hi Michelle, I configured it

ebeyrent's picture

Hi Michelle,

I configured it in the following way:

  1. admin/settings/gmap - API key was entered here
  2. admin/settings/gmap_location - enable the Google API geocoding
  3. admin/settings/location - use Google Map to set latitude and longitude
  4. admin/settings/location/maplinking - display Google Maps terms of use (irrelevant to this issue, imo)
  5. admin/settings/location/geocoding/us/google - API key was entered here

Here's the interesting part - I am using nodeprofile/usernode for custom user profiles, and I am collecting location data for a custom content type. That is working just fine - the address is geocoded and I see latitude and longitude data in the database.

My event content type is not however.

Any thoughts?

This issue is now solved.

ebeyrent's picture

This issue is now solved. There were some MySQL errors that were not being displayed, but were being displayed on the user/search view. The query being generated started off like:

SELECT DISTINCT DISTINCT...

There is a patch and description of the issue at http://drupal.org/node/184743.

Location and Mapping

Group organizers

Group categories

Wiki type

Group notifications

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