improved graphical user interface and refractored all var to const or let #6
@@ -54,7 +54,7 @@ if (!$municipality) {
|
|||||||
<link rel="stylesheet" href="https://unpkg.com/leaflet-control-geocoder@2.4.0/dist/Control.Geocoder.css">
|
<link rel="stylesheet" href="https://unpkg.com/leaflet-control-geocoder@2.4.0/dist/Control.Geocoder.css">
|
||||||
|
|
||||||
<!-- Leaflet Polyline Measurement Tool -->
|
<!-- Leaflet Polyline Measurement Tool -->
|
||||||
<link rel="stylesheet" href="https://ppete2.github.io/Leaflet.PolylineMeasure/Leaflet.PolylineMeasure.css">
|
<!-- <link rel="stylesheet" href="https://ppete2.github.io/Leaflet.PolylineMeasure/Leaflet.PolylineMeasure.css"> -->
|
||||||
|
|
||||||
<!-- Font Awesome 6 for Icons -->
|
<!-- Font Awesome 6 for Icons -->
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
||||||
@@ -321,7 +321,7 @@ if (!$municipality) {
|
|||||||
<script src="https://unpkg.com/leaflet-control-geocoder@2.4.0/dist/Control.Geocoder.min.js"></script>
|
<script src="https://unpkg.com/leaflet-control-geocoder@2.4.0/dist/Control.Geocoder.min.js"></script>
|
||||||
|
|
||||||
<!-- Leaflet PolylineMeasure -->
|
<!-- Leaflet PolylineMeasure -->
|
||||||
<script src="https://ppete2.github.io/Leaflet.PolylineMeasure/Leaflet.PolylineMeasure.js"></script>
|
<!-- <script src="https://ppete2.github.io/Leaflet.PolylineMeasure/Leaflet.PolylineMeasure.js"></script> -->
|
||||||
|
|
||||||
<!-- SweetAlert2 -->
|
<!-- SweetAlert2 -->
|
||||||
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.14.0/dist/sweetalert2.all.min.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11.14.0/dist/sweetalert2.all.min.js"></script>
|
||||||
|
|||||||
@@ -135,31 +135,31 @@ L.Control.geocoder({
|
|||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
|
|
||||||
// Polyline Measure Tool
|
// Polyline Measure Tool
|
||||||
L.control.polylineMeasure({
|
// L.control.polylineMeasure({
|
||||||
position: 'topright',
|
// position: 'topright',
|
||||||
unit: 'metres',
|
// unit: 'metres',
|
||||||
showBearings: false,
|
// showBearings: false,
|
||||||
clearMeasurementsOnStop: false,
|
// clearMeasurementsOnStop: false,
|
||||||
showClearControl: true
|
// showClearControl: true
|
||||||
}).addTo(map);
|
// }).addTo(map);
|
||||||
|
|
||||||
// Mouse Position Display
|
// Mouse Position Display
|
||||||
var MousePositionControl = L.Control.extend({
|
// var MousePositionControl = L.Control.extend({
|
||||||
options: { position: 'bottomright' },
|
// options: { position: 'bottomright' },
|
||||||
|
|
||||||
onAdd: function () {
|
// onAdd: function () {
|
||||||
var container = L.DomUtil.create('div', 'mouse-position-display');
|
// var container = L.DomUtil.create('div', 'mouse-position-display');
|
||||||
container.innerHTML = 'Lat: , Lng: ';
|
// container.innerHTML = 'Lat: , Lng: ';
|
||||||
|
|
||||||
map.on('mousemove', function (e) {
|
// map.on('mousemove', function (e) {
|
||||||
container.innerHTML = 'Lat: ' + e.latlng.lat.toFixed(5) + ', Lng: ' + e.latlng.lng.toFixed(5);
|
// container.innerHTML = 'Lat: ' + e.latlng.lat.toFixed(5) + ', Lng: ' + e.latlng.lng.toFixed(5);
|
||||||
});
|
// });
|
||||||
|
|
||||||
return container;
|
// return container;
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
new MousePositionControl().addTo(map);
|
// new MousePositionControl().addTo(map);
|
||||||
|
|
||||||
// GPS Location Button
|
// GPS Location Button
|
||||||
var GpsControl = L.Control.extend({
|
var GpsControl = L.Control.extend({
|
||||||
|
|||||||
Reference in New Issue
Block a user