Vue Google Maps how to set API Key and modify zoom


Topic: Vue Google Maps how to set API Key and modify zoom

Florian Preuss asked 4 years ago

I have a empty nuxtjs/vue project. To this I would like add a google map.

If I just add the example code of a default map to my project, this error appears: Can't find variable: google . I think this error appears, because I don't have an API Key set. Where can I set the key? Also I would like set a zoom minimum to prevent that users can point out the exact house. How can I implement that?


Mikołaj Smoleński staff commented 4 years ago

  1. The key should be added as an additional script on the page. Here's a guide: https://developers.google.com/maps/documentation/javascript/get-api-key

  2. Currently, there is no minimal zoom option.

Best regards


Florian Preuss commented 4 years ago

Thanks for your answer, I got the map working with setting the API key. I highly need a zoom-in limit, to prevent that users can point out the exact location. Even if there is no implementation yet in MDB Vue, is there any way to get this working manually?


Mikołaj Smoleński staff commented 4 years ago

I can add this feature request to our list of ideas, but can't guarantee a specific date for the next release.

Best regards


Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Open

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB Vue
  • MDB Version: 6.7.1
  • Device: MacBookPro 16\"
  • Browser: Safari
  • OS: Mac OS X Catalina
  • Provided sample code: No
  • Provided link: No
Tags