first commit - report data

This commit is contained in:
2025-03-21 10:22:45 +07:00
commit 59963790c0
3493 changed files with 1353173 additions and 0 deletions

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
"use strict";
// initialize map
var map = new GMaps({
div: '#map',
lat: -6.5637928,
lng: 106.7535061
});
// initialize map geolocation
GMaps.geolocate({
// when geolocation is allowed by user
success: function(position) {
// set center map according to user position
map.setCenter(position.coords.latitude, position.coords.longitude);
// add a marker to the map
map.addMarker({
lat: position.coords.latitude,
lng: position.coords.longitude,
title: 'You'
});
},
// when geolocation is blocked by the user
error: function(error) {
toastr.error('Geolocation failed: '+error.message);
},
// when the user's browser does not support
not_supported: function() {
toastr.error("Your browser does not support geolocation");
}
});