Skip to content

Using the googlemaps api key? #313

Open
@jlemonz

Description

@jlemonz

📚 What are you trying to do?

Hi All,

I am really stuck with this. So i use the demo code

<ScriptGoogleMaps
    ref="googleMapsRef"
    :center="query"
    :markers="markers"
    :api-key="googleMapsApiKey"
    class="group w-full h-64 rounded-lg"
    above-the-fold
    @ready="handleReady"
  />

const googleMapsApiKey = process.env.NUXT_GOOGLE_MAPS_API_KEY;

but this doesnt work? When i use my api key directly in the file it works. But putting it in the .env i wont load the map? I thought placing your api key is not secure? Already asked chatgpt but no solution.

🔍 What have you tried?

I looked at the docs. Nothing about it. I tried chatgpt and different solutions nothing works.

ℹ️ Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions