I am trying to use the location module with the GMap module to assign locations to my "event" node type and display a Google map on the page. It seems like these modules should be able to achieve that goal.

As of now, I can assign an address to an event...however no latitude and longitude values are determined from the address. Also, the map that appears in the node submission form (which I assume is for giving a latitude and longitude) is just a gray box with the navigation controls in it...which is obviously not functional. Once I assign an address to the node, I get a link on the page saying "See Map: Google Maps" below the address. This link goes to the correct location, however I would like the map to appear within the page.

When I try to assign lat/lon values manually, I get an error message at the top of the page saying "DRAW_MAP CALLED -- This api does not function at the moment!" and the map does not display,

Any help would be appreciated.

An example is here:
http://elstonfamily.org/events/2007/feb/spaghetti-outreach-dinner

Comments

bdragon’s picture

Project: Location » GMap Module
Component: Miscellaneous » Code

It's a gmap bug.

I'm not quite done with the gmap<->location interface.

dgrant’s picture

I fixed this locally for myself in 4.7. I thought maybe I uploaded a patch at some point but maybe I didn't. I'm in process of making it work with 5.0. It was a quick workaround though, not a long-term solution.

dgrant’s picture

Actually the fix I had for 4.7 won't work because gmap has changed a lot in Drupal 5. I basically just allowed the Gmap and Location module to both show up on the node edit page (they both weren't allowed to show up before because the gmap function would exit if module_exists('location') was true. Then I made the lot/long form field from the gmap get copied into the lat/long form field for the location module, upon saving the node. So what I would do is just type in an address in the gmap address part, press TAB, then the lat/long would appear and the marker would show on the map. Then I would save and the lat/long would get saved in the location module's lat/long. This was a quick hack, but it looks like the location module and the gmap module are more tightly integrated now and the location module is just using the gmap_api to grab a lat/long from a map (or hopefully from an address as before).

Dave Cohen’s picture

Same problems here. I solved the first! To get the geocoding to happen, go to ?q=admin/settings/location/geocoding/us/google (yes, it's very buried) and enter your gmaps api key. (Yes, the same one you set in the gmap module. They don't share).

I don't understand the explanation of the second problem. I'm just trying to get the location block to display when viewing the node. I'm not trying to display two maps on one page.

Any idea when this will be fixed? Is there anything I could do to help?

bdragon’s picture

I made some changes to the location chooser map that should fix all this.
Please try again with the latest DRUPAL-5.

Thanks,
--Brandon

bdragon’s picture

Status: Active » Fixed

No followups, I'm assuming everything is working now.

bdragon’s picture

Status: Fixed » Closed (fixed)