and,
and,
and,

Gmap is not defined using gmap jquery plugin

323 Views Asked by At

I am trying to use the Gmap jquery plugin:

<script src="{{asset('public/gmap.js')}}"></script>

and,

 <div id="map"></div>
    <script>

    new GMaps({
      div: '#map',
      lat: -12.043333,
      lng: -77.028333
    });

    map.addMarker({
      lat: -12.043333,
      lng: -77.028333,
      title: 'Lima',
      click: function(e) {
        alert('You clicked in this marker');
      }
    });

    infoWindow: {
      content: '<p>HTML Content</p>'
    }

    </script>

But, i am getting error in console

GMaps is not defined

0

There are 0 best solutions below