Aggiungi gestore gerarchico livelli mappa
This commit is contained in:
1 parent
708f539c64
commit
f1bbd53634
8 files changed
+774
-52
No files matched your search
@@ -61,10 +61,24 @@
|
||||
<label class="map-layer-option">
|
||||
<input type="checkbox" @bind="ShowSelectedParcels" @bind:after="ApplySelectedParcelsVisibility" />
|
||||
<span>
|
||||
<strong>Particelle selezionate</strong>
|
||||
<small>Nascondi o mostra senza eliminare i dati</small>
|
||||
<strong>Particelle catastali evidenziate</strong>
|
||||
<small>Contorni rossi ottenuti da ricerca o GPS</small>
|
||||
</span>
|
||||
</label>
|
||||
<label class="map-layer-option">
|
||||
<input type="checkbox" @bind="ShowImportedData" @bind:after="ApplyImportedDataVisibility" />
|
||||
<span>
|
||||
<strong>Dati importati</strong>
|
||||
<small>Particelle e geometrie verdi di file e progetti</small>
|
||||
</span>
|
||||
</label>
|
||||
<section class="layer-tree-section">
|
||||
<header>
|
||||
<strong>Ordine livelli e oggetti</strong>
|
||||
<small>Trascina dall'alto verso il basso</small>
|
||||
</header>
|
||||
<div id="layerManagerTree" class="layer-manager-tree"></div>
|
||||
</section>
|
||||
<div class="layer-panel-actions">
|
||||
<button class="danger-command" @onclick="ClearSelectedParcels">Elimina definitivamente le particelle selezionate</button>
|
||||
<button class="danger-command" @onclick="ClearMapElements">Pulisci elementi mappa</button>
|
||||
@@ -176,6 +190,10 @@
|
||||
? "Attivato: importa foglio, particelle e altri elementi KML/KMZ."
|
||||
: "Disattivato: importa solo i poligoni delle particelle riconosciute.")
|
||||
</small>
|
||||
<label class="toggle-line project-save-option">
|
||||
<input type="checkbox" @bind="ShowImportedData" @bind:after="ApplyImportedDataVisibility" />
|
||||
<span>Mostra particelle/dati importati in verde</span>
|
||||
</label>
|
||||
<label class="toggle-line project-save-option">
|
||||
<input type="checkbox" @bind="ShowImportedSheetLayer" @bind:after="ApplyImportedSheetLayerVisibility" />
|
||||
<span>Mostra cornice/layer del foglio importato</span>
|
||||
@@ -301,6 +319,10 @@
|
||||
|
||||
<section class="panel-section">
|
||||
<h2>Visualizzazione progetto</h2>
|
||||
<label class="toggle-line project-save-option">
|
||||
<input type="checkbox" @bind="ShowImportedData" @bind:after="ApplyImportedDataVisibility" />
|
||||
<span>Mostra particelle/dati importati in verde</span>
|
||||
</label>
|
||||
<label class="toggle-line project-save-option">
|
||||
<input type="checkbox" @bind="ShowImportedSheetLayer" @bind:after="ApplyImportedSheetLayerVisibility" />
|
||||
<span>Mostra cornice/layer del foglio importato</span>
|
||||
@@ -446,6 +468,7 @@
|
||||
private bool GpsActive { get; set; }
|
||||
private bool ShowGpsPosition { get; set; } = true;
|
||||
private bool ShowSelectedParcels { get; set; } = true;
|
||||
private bool ShowImportedData { get; set; } = true;
|
||||
private bool DrawToolsVisible { get; set; }
|
||||
private bool TrailEnabled { get; set; }
|
||||
private bool LayerPanelOpen { get; set; }
|
||||
@@ -681,6 +704,10 @@
|
||||
}
|
||||
await Task.Delay(30);
|
||||
await JS.InvokeVoidAsync("lmeMap.resize");
|
||||
if (LayerPanelOpen)
|
||||
{
|
||||
await JS.InvokeVoidAsync("lmeMap.refreshLayerManager");
|
||||
}
|
||||
}
|
||||
|
||||
private async Task ToggleLayerPanel()
|
||||
@@ -693,6 +720,10 @@
|
||||
|
||||
await Task.Delay(30);
|
||||
await JS.InvokeVoidAsync("lmeMap.resize");
|
||||
if (LayerPanelOpen)
|
||||
{
|
||||
await JS.InvokeVoidAsync("lmeMap.refreshLayerManager");
|
||||
}
|
||||
}
|
||||
|
||||
private async Task SearchLocation()
|
||||
@@ -1175,6 +1206,7 @@
|
||||
SelectedBaseLayer = options.BaseLayer;
|
||||
CadastralOpacity = options.CadastreOpacity;
|
||||
IncludeKmlSheetLayer = options.IncludeKmlSheetLayer;
|
||||
ShowImportedData = options.ImportedVisible;
|
||||
ShowImportedSheetLayer = options.ImportedSheetsVisible;
|
||||
ShowImportedMeasurements = options.ShowImportedMeasurements;
|
||||
ShowDrawingMeasurements = options.ShowDrawingMeasurements;
|
||||
@@ -1336,6 +1368,7 @@
|
||||
{
|
||||
IncludeCadastralParcels = GetFlagPreference("include_cadastral_parcels", true);
|
||||
IncludeKmlSheetLayer = GetFlagPreference("include_kml_sheet_layer", false);
|
||||
ShowImportedData = GetFlagPreference("show_imported_data", true);
|
||||
ShowImportedSheetLayer = GetFlagPreference("show_imported_sheet_layer", false);
|
||||
ShowImportedMeasurements = GetFlagPreference("show_imported_measurements", false);
|
||||
ShowDrawingMeasurements = GetFlagPreference("show_drawing_measurements", true);
|
||||
@@ -1360,6 +1393,7 @@
|
||||
{
|
||||
SetFlagPreference("include_cadastral_parcels", IncludeCadastralParcels);
|
||||
SetFlagPreference("include_kml_sheet_layer", IncludeKmlSheetLayer);
|
||||
SetFlagPreference("show_imported_data", ShowImportedData);
|
||||
SetFlagPreference("show_imported_sheet_layer", ShowImportedSheetLayer);
|
||||
SetFlagPreference("show_imported_measurements", ShowImportedMeasurements);
|
||||
SetFlagPreference("show_drawing_measurements", ShowDrawingMeasurements);
|
||||
@@ -1383,6 +1417,7 @@
|
||||
private async Task ApplyFlagPreferencesToMapAsync()
|
||||
{
|
||||
await JS.InvokeVoidAsync("lmeMap.setIncludeKmlSheetLayer", IncludeKmlSheetLayer);
|
||||
await JS.InvokeVoidAsync("lmeMap.setImportedLayerVisible", ShowImportedData);
|
||||
await JS.InvokeVoidAsync("lmeMap.setImportedSheetLayerVisible", ShowImportedSheetLayer);
|
||||
await JS.InvokeVoidAsync("lmeMap.setImportedMeasurementsVisible", ShowImportedMeasurements);
|
||||
await JS.InvokeVoidAsync("lmeMap.setDrawingMeasurementsVisible", ShowDrawingMeasurements);
|
||||
@@ -1409,6 +1444,12 @@
|
||||
await JS.InvokeVoidAsync("lmeMap.setSelectedParcelsVisible", ShowSelectedParcels);
|
||||
}
|
||||
|
||||
private async Task ApplyImportedDataVisibility()
|
||||
{
|
||||
SaveFlagPreferences();
|
||||
await JS.InvokeVoidAsync("lmeMap.setImportedLayerVisible", ShowImportedData);
|
||||
}
|
||||
|
||||
private async Task ExportCadastralImage()
|
||||
{
|
||||
ActiveTab = "map";
|
||||
@@ -1442,6 +1483,7 @@
|
||||
public double CadastreOpacity { get; init; } = 0.75;
|
||||
public string[] CadastreLayers { get; init; } = [];
|
||||
public bool IncludeKmlSheetLayer { get; init; }
|
||||
public bool ImportedVisible { get; init; } = true;
|
||||
public bool ImportedSheetsVisible { get; init; }
|
||||
public bool ShowImportedMeasurements { get; init; }
|
||||
public bool ShowDrawingMeasurements { get; init; } = true;
|
||||
|
||||
Reference in new issue
Block a user