LarsWiegers / laravel-maps

Your laravel maps libary.
https://github.com/LarsWiegers/laravel-maps
MIT License
254 stars 35 forks source link

unexpected token ':' #55

Closed jamiedavenport closed 1 week ago

jamiedavenport commented 3 months ago

i'm trying to get the examples working like so

<x-maps-google :markers="[['lat' => 52.16444513293423, 'long' => 5.985622388024091]]"></x-maps-google>

and getting this strange error

uncaught SyntaxError: Unexpected token ':' (at dashboard:565:20)
Screenshot 2024-05-31 at 14 02 22
LarsWiegers commented 3 months ago

Hey @jamiedavenport , I think you are using livewire 3, which makes use of morph markers. Those don't work well with javascript. which is what I believe I am seeing here. You could use the @json() to fix this.