Skip to content

Commit

Permalink
minor fixes, ol upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
lolochristen committed Mar 30, 2024
1 parent 88cd9cc commit de8ec05
Show file tree
Hide file tree
Showing 98 changed files with 861 additions and 815 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
</div>
</div>

<SwissMap @ref="_map" Style="height:800px;" Class="card" OnClick="OnMapClick" OnFeatureClick="OnFeatureClick"></SwissMap>
<SwissMap @ref="_map" Style="height:800px;" Class="card" OnClick="OnMapClick" OnFeatureClick="OnFeatureClick" OnShapeAdded="OnFeatureClick"></SwissMap>

@if (_currentFeature != null)
{
Expand All @@ -32,7 +32,7 @@
{
<tr>
<td class="table-secondary fw-bold">@prop.Key</td>
<td>@prop.Value</td>
<td>@prop.Value.ToString()</td>
</tr>
}
</table>
Expand Down Expand Up @@ -92,7 +92,8 @@
{
string url = $"https://api3.geo.admin.ch/rest/services/all/MapServer/identify?geometry={coordinate.X},{coordinate.Y}&geometryFormat=geojson&geometryType=esriGeometryPoint&imageDisplay=975,1117,96&lang=en&layers=all:{_selectedLayer}&limit=10&mapExtent={_map.VisibleExtent.X1},{_map.VisibleExtent.Y1},{_map.VisibleExtent.X2},{_map.VisibleExtent.Y2}&returnGeometry=true&sr=2056&timeInstant=2021&tolerance=10";
var json = await HttpClient.GetFromJsonAsync<JsonElement>(url);
var results = json.GetProperty("results");await _map.LoadGeoJson(results[0], _map.Options.CoordinatesProjection); // json is in EPSG:2056
var results = json.GetProperty("results");
await _map.LoadGeoJson(results[0], _map.Options.CoordinatesProjection); // json is in EPSG:2056
}

private void OnFeatureClick(Feature feature)
Expand Down
4 changes: 2 additions & 2 deletions src/OpenLayers.Blazor.Demo.Server/libman.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"defaultProvider": "cdnjs",
"libraries": [
{
"library": "openlayers@9.0.0",
"library": "openlayers@9.1.0",
"destination": "wwwroot/lib/openlayers/",
"files": [
"dist/ol.js",
Expand All @@ -26,7 +26,7 @@
]
},
{
"library": "[email protected].0",
"library": "[email protected].3",
"destination": "wwwroot/lib/bootstrap/",
"files": [
"js/bootstrap.bundle.js",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Loading

0 comments on commit de8ec05

Please sign in to comment.