Closed (fixed)
Project:
Google Maps location
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
7 Sep 2008 at 20:21 UTC
Updated:
11 Aug 2009 at 04:00 UTC
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
Comments
Comment #1
babbage commentedGiven how old this is, please confirm you are still experiencing this bug and I will look into it. Thanks.
Comment #2
babbage commentedComment #3
babbage commentedGonna presume this is no longer an issue.
Comment #4
bkmarsh commentedI'm having the same problem. No matter what I change the longitude/latitude reset to the default values. I'm on Drupal 5.15.
Comment #5
babbage commentedHmm... well, better open this again then.
Comment #6
dpearcefl commentedGot the same problem. Used to work.
Dave
Comment #7
dpearcefl commentedI 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
Comment #8
JaredAM commentedThis 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.
Comment #9
babbage commentedI 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.
Comment #10
babbage commentedJaredAM 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.
Comment #11
babbage commentedMoving this up to current -dev. This one will be backported when fixed.
Comment #12
babbage commentedAdded 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.
Comment #13
babbage commentedComment #14
babbage commentedIn 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
Comment #15
babbage commentedBackported improvements to 5.x-1.x: http://drupal.org/cvs?commit=243008
Comment #16
babbage commentedBackported to 6.x-1.x: http://drupal.org/cvs?commit=243640
Released in both 6.x-1.1 and 5.x-1.1.