Aggiunta vista satellite su mappe
This commit is contained in:
parent
cdda9cf5c9
commit
a97c2615de
|
@ -1630,6 +1630,10 @@ body:not(.sidebar-collapse) .sidebar .nav-treeview .nav-treeview .nav-link {
|
|||
background-image: url('../img/leaflet/icon-fullscreen.svg');
|
||||
}
|
||||
|
||||
.leaflet-control-layers-toggle {
|
||||
background-image: url('../img/leaflet/layers.png');
|
||||
}
|
||||
|
||||
/** Rimozione avviso CKEditor temporanea **/
|
||||
.cke_notification_warning{
|
||||
display:none !important;
|
||||
|
|
|
@ -122,6 +122,8 @@ if (get('op') == 'getmappa') {
|
|||
const lt = "41.706";
|
||||
const ln = "13.228";
|
||||
var container = L.DomUtil.get("mappa");
|
||||
var esri_url ="https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}";
|
||||
var esri_attribution = "© Esri © OpenStreetMap Contributors";
|
||||
|
||||
if(container._leaflet_id != null){
|
||||
map.eachLayer(function (layer) {
|
||||
|
@ -139,8 +141,22 @@ if (get('op') == 'getmappa') {
|
|||
L.tileLayer("<?php echo setting('Tile server OpenStreetMap'); ?>", {
|
||||
maxZoom: 17,
|
||||
attribution: "© OpenStreetMap"
|
||||
});
|
||||
|
||||
var street = L.tileLayer('<?php echo setting('Tile server OpenStreetMap');?>', {
|
||||
maxZoom: 17,
|
||||
attribution: "© OpenStreetMap",
|
||||
}).addTo(map);
|
||||
|
||||
var satellite = L.tileLayer(esri_url, {id: "mappa", maxZoom: 17, tileSize: 512, zoomOffset: -1, attribution: esri_attribution});
|
||||
|
||||
var baseLayers = {
|
||||
"Strade": street,
|
||||
"Satellite": satellite
|
||||
};
|
||||
|
||||
L.control.layers(baseLayers).addTo(map);
|
||||
|
||||
var markerArray = [];
|
||||
if( document.getElementById('mappa') ){
|
||||
for (let i = 0; i < lng.length; i++) {
|
||||
|
|
|
@ -94,6 +94,8 @@ foreach ($rs_stati as $stato) {
|
|||
var coords = [];
|
||||
var circle = "";
|
||||
var ROOTDIR = '<?php echo $rootdir; ?>';
|
||||
var esri_url ="https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}";
|
||||
var esri_attribution = "© Esri © OpenStreetMap Contributors";
|
||||
|
||||
function caricaMappa() {
|
||||
const lat = "41.706";
|
||||
|
@ -108,7 +110,21 @@ foreach ($rs_stati as $stato) {
|
|||
L.tileLayer("<?php echo setting('Tile server OpenStreetMap'); ?>", {
|
||||
maxZoom: 17,
|
||||
attribution: "© OpenStreetMap"
|
||||
});
|
||||
|
||||
var street = L.tileLayer('<?php echo setting('Tile server OpenStreetMap');?>', {
|
||||
maxZoom: 17,
|
||||
attribution: "© OpenStreetMap",
|
||||
}).addTo(map);
|
||||
|
||||
var satellite = L.tileLayer(esri_url, {id: "mappa", maxZoom: 17, tileSize: 512, zoomOffset: -1, attribution: esri_attribution});
|
||||
|
||||
var baseLayers = {
|
||||
"Strade": street,
|
||||
"Satellite": satellite
|
||||
};
|
||||
|
||||
L.control.layers(baseLayers).addTo(map);
|
||||
}
|
||||
|
||||
function initGeocomplete() {
|
||||
|
|
Loading…
Reference in New Issue