Skip to content
This repository has been archived by the owner on Oct 17, 2022. It is now read-only.

Google search provider does not work #50

Open
schrink opened this issue Apr 3, 2021 · 2 comments
Open

Google search provider does not work #50

schrink opened this issue Apr 3, 2021 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@schrink
Copy link

schrink commented Apr 3, 2021

Describe the bug
When I set Google as a provider, it does not change.
API key is good and working in the other parts of applicaiton

To Reproduce
Steps to reproduce the behavior:

            MapMarker::make("Location")
                ->defaultZoom(18)
                ->searchProvider('google')
                ->searchProviderKey(env('GOOGLE_MAPS_GEOCODING_API_KEY')),

Expected behavior
It should use Google Geocoding API.

Screenshots
DevTools_-ourbeloved_cy_admin_resources_churches_604_edit_and_New_Issue·_GeneaLabs_nova-map-marker-field

Environment:

  • Laravel Version: 8.34.0
  • PHP Version: 8.0.3
  • Package Version: 0.3.1
@schrink schrink added the bug Something isn't working label Apr 3, 2021
@iSaadSalman
Copy link

iSaadSalman commented Apr 20, 2021

Issue seem to be here in line # 71 on FormField:
Previously:
` const providerOptions = {};

        if (typeof this.field.searchProviderKey !== 'undefined') {
            providerOptions.params.key = this.field.searchProviderKey;
        }`

I changed it to:

const providerOptions = {params: {key: null}};

But there are other issues are there after this. This happens after clicking the suggestion second time:

nova-map-marker-field:28379 Uncaught (in promise) TypeError: Cannot create property '_leaflet_id' on string '85' at stamp (nova-map-marker-field:28379) at NewClass.getLayerId (nova-map-marker-field:35194) at NewClass.hasLayer (nova-map-marker-field:35120) at NewClass.removeLayer (nova-map-marker-field:35244) at NewClass.showResult (nova-map-marker-field:27414) at NewClass.<anonymous> (nova-map-marker-field:27401) at eval (eval at processIncludes (nova-map-marker-field:1), <anonymous>:3:4725)

@nilsE
Copy link

nilsE commented May 10, 2021

...same here: "Cannot create property '_leaflet_id' on string '85' at stamp"...
the first time you select an address it works, then this js error appears, no matter which search provider is used.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants