Sådan får du Google Maps API-nøgle

En komplet vejledning i, hvordan man får en API-nøgle, er beskrevet i den officielle Google-dokumentation her: https://developers.google.com/maps/documentation/javascript/get-api-key

Create Google API Key

I din, Google Cloud Platform Naviger til API'er & tjenester for at finde dine legitimationsoplysninger. Den nye API-nøgle kan oprettes efter at have klikket på knappen "Create credentials", og valget giver dig muligheden "API Key".

Vi anbefaler på det kraftigste, at du er opmærksom på begrænsninger. Du bør begrænse din API-nøgle ved hjælp af HTTP Referrers kun til dine websteder, der vil bruge Google Maps API-nøgle. På denne måde kan ingen andre stjæle og bruge din API-nøgle.

Enable Libraries

Hvilke API'er har jeg brug for?

Fordi Google ikke tydeligt forklarer, hvilke API'er du skal aktivere, er her listen over nødvendige API'er til alle Google Maps-funktioner:

  • Google Maps rutevejledning
  • Google Maps afstandsmatrix
  • Google Maps-højde
  • Google Maps Geokodning
  • Google Maps JavaScript

Du skal aktivere disse API'er i afsnittet Bibliotek.

Save API Key in Citadela Listing plugin

Where to insert my API key? If you login to your WordPress as an administrator, you can insert an API key in Citadela Listing -> Integrations

Debugging issues

If you encounter any issues with your Google Maps API key, you can easily debug them using the Console in your browser. To open the Console, simply right-click anywhere on the webpage, select “Inspect” or “Inspect Element,” then navigate to the “Console” tab. Here, you’ll find error messages and warnings that can help identify and resolve any issues with your API key configuration. Keep an eye out for any error messages related to the Google Maps API, and use them as clues to troubleshoot and fix the problem.