nuxt / scripts

Third-Party Scripts Meets Nuxt Developer Experience.
https://scripts.nuxt.com
MIT License
269 stars 30 forks source link

googlemaps latlng #187

Closed Alidkhh closed 4 weeks ago

Alidkhh commented 1 month ago

📚 What are you trying to do?

i use ScriptGoogleMaps component and i want to use LatLng object for set marker in google maps . i tried to pass this object to options.center and query but its not working. Am I using it wrong ?

🔍 What have you tried?

No response

ℹī¸ Additional context

No response

Ulrich-Mbouna commented 1 month ago

Hello,

I'm also confused how to set query correctly in that component.

Alidkhh commented 1 month ago

hi i tried to use this component like this but its not working , am i using it wrong? <ScriptGoogleMaps :query="{ lat: -34.397, lng: 150.644 }" :api-key="apiKey" :options="googleMapOptions" /> <ScriptGoogleMaps query="{ lat: -34.397, lng: 150.644 }" :api-key="apiKey" :options="googleMapOptions" />

Ulrich-Mbouna commented 1 month ago

Using object syntax didn't work. I use string for query (Town or quarter).

harlan-zw commented 4 weeks ago

Please refer to the new markers prop in this PR https://github.com/nuxt/scripts/pull/191, should be stable as of 0.7.1.

Also the center prop will now properly take lat/long