Problem/Motivation

I am trying to add a map field to a content type for a client utilizing the Geolocation - Address and Geolocation - Google Maps API embedded modules as we have done for other clients previously. However, I am getting the errors shown below when trying to add or update an address for a node. For sanity's sake, I checked another one of our clients that we have set this up for previously and the same errors are occurring for their site as well.

InvalidValueError: setPosition: not a LatLng or LatLngLiteral: in property lat: not a number js:199:350
InvalidValueError: setCenter: not a LatLng or LatLngLiteral with finite coordinates: in property lat: NaN is not an accepted value js:199:350
Uncaught (in promise) Error: uint32
    Yc https://maps.googleapis.com/maps/api/js?libraries=&key=[your_api_key]&callback=Drupal.geolocation.google.load:76
    pe https://maps.googleapis.com/maps/api/js?libraries=&key=[your_api_key]&callback=Drupal.geolocation.google.load:84
    Fg https://maps.googleapis.com/maps/api/js?libraries=&key=[your_api_key]&callback=Drupal.geolocation.google.load:119
    setZoom https://maps.googleapis.com/maps-api-v3/api/js/65/2d/common.js:163
    zBa https://maps.googleapis.com/maps-api-v3/api/js/65/2d/map.js:40
    wh https://maps.googleapis.com/maps-api-v3/api/js/65/2d/map.js:100
    PE https://maps.googleapis.com/maps/api/js?libraries=&key=[your_api_key]&callback=Drupal.geolocation.google.load:498

Steps to reproduce

  1. Enable the Geolocation, Geolocation - Address and Geolocation - Google Maps API modules
  2. Create a Geolocation field for a content type that has an Address field already, or create Address and Geolocation fields on a content type with neither.
  3. Change the widget for the Geolocation field to "Geolocation Google Maps API - Geocoding and Map" in the form display settings for the content type.
  4. In the settings for the widget type, check "Enable address integration" and then make sure the correct address field is selected in the "Select address field" dropdown.
  5. Create a new node for the content type and add an address to the Address field.
  6. The Latitude and Longitude values will not be set automatically for the Geolocation field.
    • Selecting the "Manually by push&pull buttons" option for Synchronization in the widget settings and then using the "Pull from Address" button didn't work for me either.
  7. You should see the errors from above in the Console.

Comments

lordbarnhill created an issue. See original summary.

lordbarnhill’s picture

Priority: Major » Minor
Status: Active » Closed (works as designed)

Closing this. I missed an error in the logs that showed the issue was with the API keys in use in the projects I was testing with.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.