Google places api filled inaccurately

Created on 22 July 2025, about 1 month ago

Problem/Motivation

A customer reported that when they use the places api the pointer seems inaccurate. After looking into it it seems that this module somehow changes the actual value gotten from the maps/places api.

Steps to reproduce

Create a new clean website with the geolocation + geolocation_google_maps + geolocation_google_places_api.
* Configure the golocation maps api so you can use it
* Add a geolocation field to a node. Configure the form view to use the "Geolocation Google Maps API - Geocoding and Map" (geolocation_googlegeocoder) plugin. (default settings is fine).
* Create a node of the type you created
* Use the places api search field to search for a location (example Warsaw).
Note how the result from the places api has a slightly different value than the filled value in drupal.
Filled: 52.233207594531564, 21.061419749999963
Api: 52.22909629999999, 21.0153648

Proposed resolution

I am uncertain where this inaccuracy is added/created

Remaining tasks

Further testing might be needed i did not know how to get a similar functionality in the 4.x branch.
The above was tested on Drupal version 11.1.7 and version 3.13 of the geolocation module.

🐛 Bug report
Status

Active

Version

3.0

Component

GoogleMapsAPI

Created by

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

Comments & Activities

  • Issue created by @Hikkypo
  • 🇩🇪Germany christianadamski Berlin, Germany

    I do not have an answer ready, but the by API you mean the PHP side? Like in the geolocaitonGooglePlaceAPI.php Plugin?

    That one calls https://maps.googleapis.com/maps/api/place/details/json under the hood.

    The widget works with the JS API instead. File geolocation-google-places-api-geocoder.js in v3. Calling JS google.maps.places.PlacesService.getDetails().

    I assume these give different results? Or they determine different "Place ID"?

    Can you test that?

Production build 0.71.5 2024