The issue below was originally posted to gmap but I've since found that the issue really lies with location so I'm moving this to the proper queue. The problem is that the location module is using the variable gmap_user_map when it should be using gmap_location_map.

---

I've got a CCK node that is location enabled. Since installing Gmap, it also has a map on it for setting the lat/long. However, this map is huge and defaults to a large overview centered on Spain. Since my website is local, I'd like to center it on my area. I tried making a macro for showing my area and pasting it in the settings for both "Default location map" under the Gmap settings and "Default node map" under Gmap location settings but the map hasn't changed. I tried clearing the cache and hard reloading the page so that's not it. Any suggestions for getting this to work? Is it supposed to work or am I misunderstanding?

Thanks,

Michelle

Comments

jferjan’s picture

subscribing

csc4’s picture

I've got the same problem - I can't seem to get the centering or zoom level to change

csc4’s picture

I've got the same problem - I can't seem to get the centering or zoom level to change

michelle’s picture

If you read the little note at the top, it's using the user macro instead of the node macro like it should. Make sure you have that set.

Michelle

csc4’s picture

Ah - thought that was a different problem. So is the fix really to patch it so it's using the right location?

Tpainton-1’s picture

Im sorry.. So how exactly does this get fixed? I'd like my map to be centered on my town.. Not Spain. Thanks. Could you walk me throught he fix? Thanks a ton.

smitty’s picture

In line 348 of location.inc (version of 2007-Aug-02) I replaced 'gmap_user_map' with 'gmap_location_map'. Now the right macro is used.

Could anybody check, if this change is sufficient or if there are additional changes necessary elsewhere?

Would be nice, to see this issue fixed in the next version.

raintonr’s picture

If one changes the location_latlon_form to use the variable gmap_location_map then that setting is configured at the bottom of the GMap options page:

http://your.drupal.install/admin/settings/gmap

"Default location map: The gmap macro for the map to be used in the location.module for setting latitude and longitude."

That said, size and zoom seem to work here, but centre is slightly off. I think this is not an issue with the location module, more GMap. When I click on the map to set locations that module cannot determine the 'click' location correctly and puts the marker some distance away from there.

scottrigby’s picture

subscribe

raymondllee’s picture

subsribe

fiLi’s picture

subscribing
"replaced 'gmap_user_map' with 'gmap_location_map'" doesn't seem sufficient.

smitty’s picture

For me "replaced 'gmap_user_map' with 'gmap_location_map'" works perfectly.
Did you set the center in the "Default location map" macro (|center=51,9) or in the "Default center" of "Default map settings"?

raintonr’s picture

Did you set the center in the "Default location map" macro (|center=51,9) or in the "Default center" of "Default map settings"?

Erm... we have them both set to the same value.

The gmap macro here is [gmap zoom=9 |center=-33.87497640410958,151.0400390625 |width=450px |height=450px |id=macro_map |control=Small |type=Map] which is centered on Sydney, Australia.

The "Default center:" field under the map is -33.87497640410958,151.0400390625.

bdragon’s picture

Status: Active » Closed (fixed)

Closing, 3.x should have saner default macros.