Cannot get any location other than the default?

brianshumate - September 7, 2008 - 20:21
Project:Google Maps location
Version:6.x-2.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

I cannot get this module to display a location other than the default of 46.051426 x 14.505965.

I have filled in addresses, general geographical areas, along with (and without) the lat/lon coordinates, but every time I save these settings the map, map block, and settings page still show only the location 46.051426 x 14.505965. :-(

As a possible related aside, the geocoding doesn't seem to be working, and I do not see the map for dragging a marker to adjust, either.

This is on PHP5, Drupal version 5.10 and GMap Location version 5.x-1.0-1

#1

dbabbage - February 16, 2009 - 04:28

Given how old this is, please confirm you are still experiencing this bug and I will look into it. Thanks.

#2

dbabbage - February 17, 2009 - 22:11
Status:active» postponed (maintainer needs more info)

#3

dbabbage - March 22, 2009 - 08:31
Status:postponed (maintainer needs more info)» closed

Gonna presume this is no longer an issue.

#4

bkmarsh - March 23, 2009 - 02:47

I'm having the same problem. No matter what I change the longitude/latitude reset to the default values. I'm on Drupal 5.15.

#5

dbabbage - March 27, 2009 - 04:02
Status:closed» active

Hmm... well, better open this again then.

#6

dpearceMN - April 1, 2009 - 16:03

Got the same problem. Used to work.

Dave

#7

dpearceMN - April 2, 2009 - 22:21

I figured out where it is breaking but not why. The code looks good.

In gmaplocation.module, line 173, we have:
$page = @file_get_contents( $url, false, $context );

If I change it to this, it will work:
$page = @file_get_contents( $url, false );

I can't find anything wrong the the $context variable. May be someone else can.

Dave

#8

JaredAM - June 20, 2009 - 22:22

This might be an issue with Google resolving the address. The module will revert the lat & lon if it doesn't get anything back from Google.

I ended up in the ocean several times before getting Google find the address.

Try entering a comma separated address: XXX Street, City, State, Zip.

#9

dbabbage - June 22, 2009 - 11:58

I wonder if this is the same bug as #496796: Validate point to the wrong function. I am not running Drupal 5. Is anyone able to check—it was a simple fix.

#10

dbabbage - July 15, 2009 - 04:34
Version:5.x-1.0-1» 6.x-1.0-beta3

JaredAM is right—I've now confirmed this is to do with gmaplocation just sticking with the current coordinates (which will initially be the default ones) if it does not get a useful answer back from Google. Comma-separated addresses are good, but also try dropping out suburb and state information as this worked for me in one situation.

This will be fixed in due course. And since it applies to 6.x as well, I'm marking it against that version, although I'll try to backport any fixes.

#11

dbabbage - July 16, 2009 - 10:44
Version:6.x-1.0-beta3» 6.x-2.x-dev

Moving this up to current -dev. This one will be backported when fixed.

#12

dbabbage - July 18, 2009 - 05:21

Added warning message when geocoding fails:
6.x-2.x: http://drupal.org/cvs?commit=238906
6.x-1.x: http://drupal.org/cvs?commit=238946
5.x-1.x: http://drupal.org/cvs?commit=238910

When geocoding fails, default coordinates are used even if there were other coordinates. This issue will remain open as a feature request until I modify that behaviour so it sticks with previous coordinates instead.

#13

dbabbage - July 18, 2009 - 05:21
Category:bug report» feature request

#14

dbabbage - July 21, 2009 - 03:06
Status:active» fixed

In 2.x when geocoding fails, previous coordinates are now maintained rather than being replaced by the defaults. Where coordinates have not previously been set the (new) default coordinates are inserted. Updated message presented to user to explain what has happened. http://drupal.org/cvs?commit=240480

#15

dbabbage - July 26, 2009 - 10:54

Backported improvements to 5.x-1.x: http://drupal.org/cvs?commit=243008

#16

dbabbage - July 28, 2009 - 03:51

Backported to 6.x-1.x: http://drupal.org/cvs?commit=243640
Released in both 6.x-1.1 and 5.x-1.1.

#17

System Message - August 11, 2009 - 04:00
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.