Compatibility of Openlayers Quick Query with Lat/Lon widget for geofield

Created on 22 July 2013, about 11 years ago
Updated 1 March 2023, over 1 year ago

Hi
I am using the following modules.

  • Geofield 7.x.1.1
  • OpenLayers 7.x-2.0-beta3

I am facing the same issue. Page load time is in minutes and page size in MB’s. I installed and enabled your sandbox module Openlayers Quick Query. But I am using latitude/longitude widget instead of WKT field. Your module is not compatible with latitude/longitude widget. I am getting the following error.

“Fatal error: Cannot access empty property in D:\xampp\htdocs\parkwise22\sites\all\modules\openlayers_quick_query\openlayers_quick_query.module on line 97”

I debug it and I found that $val->{$wkt_alias } is not populated at line #97 in openlayers_quick_query.module file.

  // Preprocess basic URL for node/<nid> type links
  $b_url = url('node', array('alias' => TRUE));
  foreach ($view->result as $key => $val) {
    $row = array(
      'projection' => $projection,
      'attributes' => array(
      ),
      'wkt' => $val->{$wkt_alias}
    );

I have implemented hook_openlayers_quick_query_info. I m using title field only for the time being but I will use some additional fields too from my content type.

function parkwise_utilities_openlayers_quick_query_info($view) {
  if ($view->name == 'campground_search_map') {
    // Add projection and wkt information
    $info['projection'] = '4326';
    $info['wkt_field'] = 'field_location';

    // Add needed fields
    $info['fields'][] = array(
      'field_name' => 'field_location'
    );
    
          $info['fields'][] = array(
         'field_name' => 'title',
         'additional_fields' => FALSE
              );

     $info['attributes'] = array(
      'nid' => 'nid',
      'name' => 'node_link_fast',
      'title' => 'title'   // Special very fast node_link linking the title using just node/<nid> with no aliases
    );
    return $info;
  }
}

Please guide me how i can resolve this issue?

Thank you,

Zeeshan.

Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

🇵🇰Pakistan xeeshangulzar

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024