render function keeps empty: This map has 0 points

Created on 9 April 2024, 9 months ago
Updated 9 June 2024, 7 months ago

In drupal-project/web/modules/contrib/styled_google_map/src/Plugin/views/style/StyledGoogleMapStyle.php the $results is empty after upgrade from Drupal 9 to Drupal 10.

D9.2.9: styled_google_map (8.X-2.0) / geocoder (8.x-3.20)
D10.2.5: styled_google_map (8.x-2.3) / geocoder (8.X-4.23)

create a view, select "styled google map" as format, add geolocation field and select it as field that contains the geodata.
(raw output / WKT)

The content type exists of a address field and a geolocation.

Below pre_prender function is correctly populated with the results, but the $results within the render() function remains empty (StyledGoogleMapStyle.php)...

function styled_google_map_views_pre_render(Drupal\views\ViewExecutable $view) {
  if ($view->id() == 'your_view_id') {
    \Drupal::logger('styled_google_map')->notice('Pre-render results: @results', ['@results' => print_r($view->result, TRUE)]);
  }
}

No js errors, no php errors.
why is the result empty?
This map has 0 points

πŸ› Bug report
Status

Fixed

Version

2.3

Component

Code

Created by

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024