Skip to content
Snippets Groups Projects
Commit 48377953 authored by Andriy Podanenko's avatar Andriy Podanenko
Browse files

Issue #1153032 by citlacom, podarok: Fixed Markers doesn't work in a view with...

Issue #1153032 by citlacom, podarok: Fixed Markers doesn't work in a view with the configuration: choose latitude and longitude fields.
parent 72caa00b
No related branches found
No related tags found
No related merge requests found
...@@ -109,8 +109,8 @@ class gmap_plugin_style_gmap extends views_plugin_style { ...@@ -109,8 +109,8 @@ class gmap_plugin_style_gmap extends views_plugin_style {
else if ($this->options['datasource'] == 'fields') { else if ($this->options['datasource'] == 'fields') {
$lat_field_obj = $this->view->display_handler->get_handler('field', $this->options['latfield']); $lat_field_obj = $this->view->display_handler->get_handler('field', $this->options['latfield']);
$lon_field_obj = $this->view->display_handler->get_handler('field', $this->options['lonfield']); $lon_field_obj = $this->view->display_handler->get_handler('field', $this->options['lonfield']);
$lat_field = $this->options['latfield']; $lat_field = $lat_fied_obj->field_alias;
$lon_field = $this->options['lonfield']; $lon_field = $lon_field_obj->field_alias;
} }
// Determine fieldname for marker field. // Determine fieldname for marker field.
...@@ -193,8 +193,8 @@ class gmap_plugin_style_gmap extends views_plugin_style { ...@@ -193,8 +193,8 @@ class gmap_plugin_style_gmap extends views_plugin_style {
$custom_field_lat = isset($row->{$custom_field_latname}[0]['raw']) ? $row->{$custom_field_latname}[0]['raw'] : NULL; $custom_field_lat = isset($row->{$custom_field_latname}[0]['raw']) ? $row->{$custom_field_latname}[0]['raw'] : NULL;
$custom_field_lon = isset($row->{$custom_field_lonname}[0]['raw']) ? $row->{$custom_field_lonname}[0]['raw'] : NULL; $custom_field_lon = isset($row->{$custom_field_lonname}[0]['raw']) ? $row->{$custom_field_lonname}[0]['raw'] : NULL;
if ($custom_field_lat && $custom_field_lon) { if ($custom_field_lat && $custom_field_lon) {
$lat = (float)$custom_field_lat['value']; $lat = (float)$row->{$lat_field};
$lon = (float)$custom_field_lon['value']; $lon = (float)$row->{$lon_field};
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment