"use strict";// initialize mapvarmap=newGMaps({div:'#map',lat:-6.5637928,lng:106.7535061});// initialize map geolocationGMaps.geolocate({// when geolocation is allowed by usersuccess:function(position){// set center map according to user positionmap.setCenter(position.coords.latitude,position.coords.longitude);// add a marker to the mapmap.addMarker({lat:position.coords.latitude,lng:position.coords.longitude,title:'You'});},// when geolocation is blocked by the usererror:function(error){toastr.error('Geolocation failed: '+error.message);},// when the user's browser does not supportnot_supported:function(){toastr.error("Your browser does not support geolocation");}});