I think I did everything that I was supposed to, even installing gmap and getting a google api, but for some reason there is no map being displayed when I enter an address (actually it looks more like the ocean with no land anywhere).

Comments

SeanBannister’s picture

There appears to be a number of bugs in relation to this at the moment :
http://drupal.org/node/346605
http://drupal.org/node/347091

I'm currently waiting it out until these are fixed.

SeanBannister’s picture

Status: Active » Closed (duplicate)
chazz’s picture

I have the same problem, map is beign showed after the latest patch, but all I can see is the middle of the ocean, but in edit mode everything is fine....

chazz’s picture

Status: Closed (duplicate) » Active

Ok I found the reason why is like that
In display settings, if you select "Hide fields from display: COORDINATES", then map will be in the center of the ocean!
It must be a minor bug or something... I don't really need coordinates to be displayed... thank you for help if anyone know how to fix this

karens’s picture

Title: blank map » No map shows without coordinates
Category: support » bug

Renaming this to reflect the problem, which I also saw. If you choose not to display the coordinates you also get no map. An easy fix would be to use #access on the display of the coordinates instead of removing them. I have not tested it but I think that will preserve them so the map will work but keep them from being displayed.

karens’s picture

Status: Active » Fixed

Nope, took another look and we just need to re-organize template_preprocess_location. Currently it unsets the lat and long as the very first step, before doing anything else, including drawing the map. We need to create the map before unsetting those values. Creating the map is not even in the current code, it was added by my patch #363690: Can't see the map at all, so I'll go back and re-jigger that patch so it will work.

Status: Fixed » Closed (fixed)

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

whalebeach’s picture

Status: Closed (fixed) » Active

I using php 5.2.10 and I avoid this by:

/**
 * Theme preprocess function for a location.
 */
function template_preprocess_location(&$variables) {
  $location = $variables['location'];
  foreach($variables['hide'] as $key) {
    unset($location[$key]);
    // Special case for coords.
-    if ($key == 'coords') {
+    if ((string)$key == 'coords') {
      unset($location['latitude']);
      unset($location['longitude']);
    }
  }


As my case, unset lat and lon happens when $variables['hide'] is like below because (0 == 'coods') is true.

    [hide] => Array
        (
            [0] => 1
            [1] => 0
        )
yesct’s picture

Status: Active » Postponed (maintainer needs more info)

did this get fixed? in the new release or in Karen's other patch?

ankur’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Unable to reproduce with the latest 6.x-3.x dev snapshot.