using the current dev versions of gmap and views, i configured a extended gmap view to use a title and two separate, number latitude longitude fields.

when displaying the view page, i receive the following error without any map being displayed:

Debug:
'Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column \'latitude\' in \'field list\''
in views_plugin_query_default->execute() (line 1356 of /Applications/MAMP/htdocs/austrofeedr/profiles/austrofeedr/modules/views/plugins/views_plugin_query_default.inc).

thanks for your hints

Comments

TimelessDomain’s picture

getting this error as well

botris’s picture

Same, got:

Drupal 7.4
Views 7.3-dev (first tried with rc1)
Views php 7.1-dev (use this to renerate the long & lat fields)
Gmap 7.1-dev

Strange thing is that it all worked fine during my testing.
Then I updated some modules, changed the fields on my content type went back to views, and got this error.
No matter what I tried (like recreating the view) nothing works.

Edit:
Removed other comment it was non related

botris’s picture

Also strange, when I save a Gmap (or Extended gmap) or it runs the auto preview in views it displays a status message on screen with the current unix time stamp....

desierto’s picture

Category: support » bug

I am getting this error as well. I am simple trying to make a gmap view with all taxonomy locations in one vocabulary. I think this needs to be changed to a "bug report" from "feature request".

Loikkk’s picture

I'm getting this error as well. is there any solution?

breos’s picture

Same problem here, with gmap 11 april version and Views 7.x-3.0-beta3. Extended Gmap getting error and Gmap no error but the mark is showed in Guinea :-/

Canadaka’s picture

same problem here

andrea.cavattoni’s picture

The problem is the query if you give a look into the sql views debug:

latitude AS gmap_lat, longitude AS gmap_lon..

so we have to change it into

'latitude' AS gmap_lat, 'longitude' AS gmap_lon..

Now i'll try to change the module

andrea.cavattoni’s picture

solved deleting the code at line 70 in gmap_plugin_style_gmapextended.inc

    if ($this->options['datasource'] == 'location') {
      $table = $this->view->query->ensure_table('location');
      $this->view->query->add_field($table, 'latitude', 'gmap_lat');
      $this->view->query->add_field($table, 'longitude', 'gmap_lon');
    }

bless

nkschaefer’s picture

Status: Active » Needs review
StatusFileSize
new1.03 KB

What's missing is actually a form element to select the datasource. Right now, it thinks you're using the Location module to provide latitude and longitude, even if you specify latitude and longitude fields. It looks like this option exists for the regular GMap views display - make sure you choose "fields" and not "location" as your datasource.

This patch adds the same option to the Extended GMap views display. Just go into settings and tell it to use fields, not Location module, as a data source, and it should work.

pieterdc’s picture

Thanks @nkschaefer
The patch works for me. I don't get the error message any more and the markers show on the map.

andrea.cavattoni’s picture

iancawthorne’s picture

I can confirm the patch at #10 works for me too.

phryll93’s picture

Thank you so much!! :D

podarok’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Needs review » Fixed

#10 looks good
commited / pushed to 7.x-2.x and 7.x-1.x branches

thanks!!!

Status: Fixed » Closed (fixed)

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