bradcornford / Googlmapper

An easy way to integrate Google Maps with Laravel
MIT License
464 stars 142 forks source link

Callback raising initialize_method is not a function #285

Closed DLO33 closed 4 years ago

DLO33 commented 6 years ago

I have a page with a single map and sometimes I get a 'initialize_method is not a function' error and the map doesn't load. Using cornford/googlmapper v 2.32. I have async set to true but still encountering this error.

Controller:

Mapper::map($lat, $lng, ['zoom' => 14, 'marker' => true, 'center' => true,
                  'draggable' => true, 'streetViewControl' => false,
                  'mapTypeControl' => false, 'fullscreenControl' => false, 'async' => true,
                  'eventAfterLoad' => 'mapLoaded()']);

Blade:

<div id="listing-map">
    {!! Mapper::render () !!}
  </div>

Error: image

bradcornford commented 4 years ago

Hi there,

I'm sorry your facing an issue, however can you please provide more information to allow me to debug this further.