Skip to content

Commit

Permalink
allign default zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
lolochristen committed Jan 15, 2024
1 parent b88c969 commit 8ea23d7
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Pointer: @_pointer
</div>
</div>

<OpenStreetMap @ref="_map" Style="height: 300px" Class="card mb-2"
<OpenStreetMap @ref="_map" Style="height: 500px" Class="card mb-2"
CenterChanged="OnCenterChanged"
OnRenderComplete="OnRenderComplete"
OnClick="OnClick"
Expand Down
2 changes: 1 addition & 1 deletion src/OpenLayers.Blazor/Map.razor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public Map()
/// Zoom level of the map
/// </summary>
[Parameter]
public double Zoom { get; set; } = 2;
public double Zoom { get; set; } = 5;

/// <summary>
/// Event on zoom changes
Expand Down
1 change: 0 additions & 1 deletion src/OpenLayers.Blazor/OpenStreetMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,5 @@ public OpenStreetMap()
SourceType = SourceType.OSM
});
Center = new Coordinate(0, 0);
Zoom = 10;
}
}
2 changes: 1 addition & 1 deletion src/OpenLayers.Blazor/SwissMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ public SwissMap()
LayerId = "ch.swisstopo.pixelkarte-farbe";
SetBaseLayer(LayerId);
Center = new Coordinate { X = 2660013.54, Y = 1185171.98 }; // Swiss Center
Zoom = 2.4;
Defaults.CoordinatesProjection = "EPSG:2056"; // VT95
Zoom = 2.4;
}


Expand Down

0 comments on commit 8ea23d7

Please sign in to comment.