I've got gmap up and running happily displaying both node maps and user maps. It also happily inserts coordinates into the latitude and longitude fields - but not for nodes, only for users.

Looking at the HTML it seems that the gmap_geocodeaddress onchange function is only there for the user account form.

Any clues why it should work for the user account form but not the node submission form?

I've searched the whole site but I can't find an answer, I'm a recent drupal convert so please excuse me if I've submitted this question in the wrong place.

Comments

webgeer’s picture

Category: bug » support

There are 2 different methods you can use. Either using location.module or using the built in functionality of gmap_location.module.

With location module you have to have nodes set up to accept locations, and you have to enable the ability of a user to set lat/long for a node.

If you are using gmap_location.module, similar to location.module you have to enable the setting of a location on the admin/settings/content-types page by configuring the content type that you want to set a location for. Then when you create or edit a node you will be able to set the long/lat for that node.

Hope that helps

bahwi’s picture

I'm having a similar problem, when creating a new node the google map comes up and you can click on it, but the longitude/latitude coordinates never get filled in(the marker does show on the google map where you clicked).

webgeer’s picture

Perhaps I misunderstood the problem.

However, I am not having this problem. Both the sites I have that use location.module and the sites that use only gmap_location.module seem to be working fine.

I suggest getting the most recent version of the module and trying again. If you continue to have this problem, please tell me what your setup is (do you use location.module or only gmap_location.module)

billk2’s picture

Thanks for your quick replies.

My problem is the same as described by bahwi, the coordinates aren't filled by the map.
I've now installed the 08/07/2006 release but still get the problem.

I've just un-enabled the location.module and now notice the extra Google Maps panel on the adminster > settings > content type > configure form. This works as expected when enabled, but stops again when the location.module is re-enabled.

I've got the following modules enabled:
comment
contact
content
gmap
gmap_location
help
location
menu
node
nodereference
number
optionwidgets
page
profile
search
story
system
taxonomy
text
user
watchdog
weburl

I'm using the bluemarine theme.

bahwi’s picture

I've upgraded the gmap and location modules as of this morning to no avail.

I volunteer my site for use, as it's a new drupal site today so nothing's on it yet.

http://www.veggiemap.org/
u: bahwi
p: bugfix

Hope this helps.

webgeer’s picture

I'm sorry I had forgotten about this problem. It is in location.module not gmap

You have to apply the patch shown here: http://drupal.org/node/69449 in order to use location.module with gmap.

Unfortunately I am not able to apply this patch myself, so you should add a comment to that page and ask the maintainer of locaiton.module to please update his module with that patch for it to work.

If you do not know how to apply a patch, please email me and I will see if I can email you a location.module that has this patch applied.

James
(webgeer)

billk2’s picture

Thanks tracking this down, and thanks bahwi for you help too.

I've only been a Drupal user for a couple of weeks so I don't have a live site yet, so it's probably easier if I presume the fix will happen and carry on with my build regardless.

I've posted a follow-up for the issue in the location.module.

ansorg’s picture

hello and thanks,

the patch fixed the "cannot click to add lat/lon in node edit"

But one issue remains:
the "Node locations" map remains empty although there are now two pages with location data. (bmap on the pages itself shows the entered location)

The usermap does work, just the nodemap not.

any pointers to solution for that issue?

thanks

geodaniel’s picture

The patch over at #69449 worked fine for me too.

As for the other issue, I've seen that on one of the sites I've been working on - though not on two of the others. I think perhaps it's an issue with location_views module as I am not using that on those other two sites.

webgeer’s picture

The patch has now been committed (Thanks Ankur) so if you are having a problem like this, please ensure you download the latest version of location.module.

bdragon’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)