Skip to content
Advertisement

Laravel maps markers are not displaying?

I am trying to get my google maps markers to display onto my laravel project, but none of the markers seem to be showing. I have done a dd() on places and it shows that it is getting information from the database. But for some reason none of the markers seem to be showing.

JavaScript

With the controller:

JavaScript

This is what the first item of my arays looks like as well:

JavaScript

Advertisement

Answer

JavaScript

You should acces your place data like place[i].latitude, place[i].longitude not places[i][1]

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement