Ooops! No Api Key Found even if it's there

Support MB Geolocation Ooops! No Api Key Found even if it's thereResolved

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9906
    MauroMauro
    Participant

    Hello, I have pasted my Google Maps Javascript Api Key in the appropriate field of the MB Builder for a location field in the back-end. When I access it, the map disappears and an error says "Oops! Something went wrong. This page didn't load Google Maps correctly. See the JavaScript console for technical details."

    The console says:
    [Error] Google Maps JavaScript API error: MissingKeyMapError https://developers.google.com/maps/documentation/javascript/error-messages#missing-key-map-error
    Hb (js:39:442)
    (anonymous function) (common.js:54:118)
    (anonymous function) (common.js:152:176)
    c (common.js:48:86)
    Global Code (AuthenticationService.Authenticate:1)
    [Warning] Google Maps JavaScript API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys (util.js, line 226)

    What am I doing wrong?

    #9934
    Anh TranAnh Tran
    Keymaster

    Oops, sorry. For geolocation extension, the API key is loaded via a filter, please see the sample code here:

    https://docs.metabox.io/extensions/meta-box-geolocation/#google-api-key

    #9939
    MauroMauro
    Participant

    Works great now!... So I assume the MetaBox Builder field should not be there, or the code generated should add the filter for me.

    One question, I can show the address I type on the map, and the pin is placed in the correct location.

    If I place the red pin elsewhere can I have it populate the address using the position of the pin instead?

    #10061
    Anh TranAnh Tran
    Keymaster

    Hi Mauro,

    I'll update the Builder and Geolocation extensions to make the API key part easier.

    One question, I can show the address I type on the map, and the pin is placed in the correct location.

    Updating the pin in the map regarding the address is out of scope of the Geolocation. It autopopulates the address parts only. The map is handled by the map field.

    If I place the red pin elsewhere can I have it populate the address using the position of the pin instead?

    I'm afraid there is no reverse process. Only one way from address to location.

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.