Skip to content

Commit 3a4c158

Browse files
dotMortenMorten NielsenmstefarovpMaske
authored
V.next (#509)
* v200.1 * WPF Popupviewer updates (#491) * Switch to use PopupElements for popup viewer control * Address namespace changes * Update WindowsAppSDK version to match MAUI requirements (#500) * Update deprecated property * Add properties to allow compiling for .NET Framework * Fix typo * Avoid navigation string resources in toolkit package * Updates relevant to popupviewer enhancements (cherry picked from commit 273a7d7) * Update README.md Co-authored-by: Morten Nielsen <1378165+dotMorten@users.noreply.github.com> * Update docs/popup-viewer.md Co-authored-by: Morten Nielsen <1378165+dotMorten@users.noreply.github.com> * Fix min-version support in MAUI * Maui: Ensure fonts are packaged and deployed * Add support for basic HTML in popups (#504) * Work around asset deployment issues caused by WinAppSDK See https://github.com/microsoft/WindowsAppSDK/issues/3546 for details * Also include assets in lib folder for library layout Follow-up to work around issue https://github.com/microsoft/WindowsAppSDK/issues/3546 * Set background on toolbar --------- Co-authored-by: Morten Nielsen <mort5161@esri.com> Co-authored-by: Matvei Stefarov <mstefarov@esri.com> Co-authored-by: Preeti Maske <pmaske@esri.com>
1 parent 593cc5f commit 3a4c158

28 files changed

Lines changed: 2497 additions & 86 deletions

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
The ArcGIS Maps SDK for .NET Toolkit contains controls and components to accelerate your development with [ArcGIS Maps SDK for .NET](https://developers.arcgis.com/net/).
1111

12-
> **Note**: At version 200.0, Toolkit assemblies are now built individually for each platform. Please replace any existing `Esri.ArcGISRuntime.Toolkit` NuGet reference with Toolkit NuGet package specific to that platform. For example if you have a WPF application using Toolkit, you will need to uninstall `Esri.ArcGISRuntime.Toolkit` NuGet package and add `Esri.ArcGISRuntime.Toolkit.WPF` NuGet package.
12+
> **Note**: Starting at version 200.0, Toolkit assemblies are now built individually for each platform. Please replace any existing `Esri.ArcGISRuntime.Toolkit` NuGet reference with Toolkit NuGet package specific to that platform. For example if you have a WPF application using Toolkit, you will need to uninstall `Esri.ArcGISRuntime.Toolkit` NuGet package and add `Esri.ArcGISRuntime.Toolkit.WPF` NuGet package.
1313
1414
# Documentation
1515

@@ -27,6 +27,7 @@ The ArcGIS Maps SDK for .NET Toolkit contains controls and components to acceler
2727
| [Legend](docs/legend.md) | <img src="https://user-images.githubusercontent.com/1378165/73389924-011fc200-428a-11ea-91bf-4ea1c2bf6683.png" width="105" title="Legend" />| Display a legend for a map or scene view. | WinUI, MAUI, UWP, WPF |
2828
| [MeasureToolbar](docs/measure-toolbar.md) | ![MeasureToolbar](https://user-images.githubusercontent.com/1378165/73389958-0f6dde00-428a-11ea-8c78-7192d49ea605.png) | Measure distances, areas, and features in a map view. | UWP, WPF |
2929
|[OverviewMap](docs/overview-map.md) | <img src="https://user-images.githubusercontent.com/29742178/121975740-34f07000-cd37-11eb-9162-462925cb3fe7.png" width="150" title="Overview Map" /> | Display an interactive inset map for a map or scene. | WinUI, MAUI, UWP, WPF |
30+
|[PopupViewer](docs/popup-viewer.md) | <img src="https://user-images.githubusercontent.com/3878047/228625594-d0009216-0cb3-4836-9a62-e197371779ac.png" width="150" title="Popup Viewer" /> | Displays information from simple popups. | WinUI, MAUI, UWP, WPF |
3031
| [ScaleLine](docs/scale-line.md) | ![ScaleLine](https://user-images.githubusercontent.com/1378165/73390077-3debb900-428a-11ea-8b2f-dfd4914a637e.png) | Display the current scale reference for a map. | WinUI, MAUI, UWP, WPF |
3132
|[SearchView](docs/search-view.md) | <img title="Search View" width="150" src="https://user-images.githubusercontent.com/29742178/142301018-4bbeb0f2-3021-49a7-b5ec-f642c5700bd0.png" /> | Search using one or more locators, with support for suggestions, automatic zooming, and custom search sources. | WinUI, MAUI, UWP, WPF |
3233
| [SymbolDisplay](docs/symbol-display.md) | ![SymbolDisplay](https://user-images.githubusercontent.com/1378165/73390051-31676080-428a-11ea-9feb-afb5d2aa6385.png) | Render a symbol in a control. | WinUI, MAUI, UWP, WPF |
@@ -35,8 +36,6 @@ The ArcGIS Maps SDK for .NET Toolkit contains controls and components to acceler
3536

3637
## Get started
3738

38-
> **Note**: At version 200.0, Toolkit assemblies are now built individually for each platform. Please replace any existing `Esri.ArcGISRuntime.Toolkit` NuGet reference with Toolkit NuGet package specific to that platform. For example if you have a WPF application using Toolkit, you will need to uninstall `Esri.ArcGISRuntime.Toolkit` NuGet package and add `Esri.ArcGISRuntime.Toolkit.WPF` NuGet package.
39-
4039
The simplest way to get started is to add the platform-specific NuGet package(s) to your projects:
4140

4241
- WPF: `Esri.ArcGISRuntime.Toolkit.WPF`

docs/popup-viewer.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22

33
Displays information from simple [popups](https://pro.arcgis.com/en/pro-app/latest/help/mapping/navigation/configure-pop-ups.htm).
44

5-
<img src="https://user-images.githubusercontent.com/1378165/73389991-1e549080-428a-11ea-81f3-b2f9c29f61ad.png" width="120" />
5+
<img src="https://user-images.githubusercontent.com/3878047/228625594-d0009216-0cb3-4836-9a62-e197371779ac.png" width="120" />
66

77
## Features
88

99
- Supports limited text display from HTML-based popups.
10+
- Supports charts, media, attachments.
1011
- Supports basic display of fields and values in non-HTML-based popups.
1112

12-
> **Important**: PopupViewer does not support charts or multimedia.
13+
> **Important**: Support for charts, multimedia, and attachments is currently only available for WPF.
1314
1415
## Usage
1516

src/Directory.Build.props

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<Project>
22

33
<PropertyGroup>
4-
<ArcGISRuntimeToolkitPackageVersion Condition="'$(ArcGISRuntimeToolkitPackageVersion)'==''">200.0.0</ArcGISRuntimeToolkitPackageVersion>
5-
<ArcGISRuntimePackageVersion Condition="'$(ArcGISRuntimePackageVersion)'==''">200.0.0</ArcGISRuntimePackageVersion>
4+
<ArcGISRuntimeToolkitPackageVersion Condition="'$(ArcGISRuntimeToolkitPackageVersion)'==''">200.1.0</ArcGISRuntimeToolkitPackageVersion>
5+
<ArcGISRuntimePackageVersion Condition="'$(ArcGISRuntimePackageVersion)'==''">200.1.0</ArcGISRuntimePackageVersion>
66

77
<!--Common package properties-->
88
<Authors>Esri Inc.</Authors>

src/Samples/Toolkit.SampleApp.UWP/Samples/MeasureToolbar/MeasureToolbarSample.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<esriUI:GraphicsOverlay Renderer="{StaticResource SR}" />
2222
</esri:MapView.GraphicsOverlays>
2323
</esri:MapView>
24-
<toolkit:MeasureToolbar VerticalAlignment="Top"
24+
<toolkit:MeasureToolbar VerticalAlignment="Top" Background="{ThemeResource ApplicationPageBackgroundThemeBrush}"
2525
HorizontalAlignment="Right"
2626
MapView="{Binding ElementName=mapView}" />
2727
</Grid>

src/Samples/Toolkit.SampleApp.WPF/Samples/PopupViewer/PopupViewerSample.xaml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,15 @@
77
mc:Ignorable="d"
88
d:DesignHeight="300" d:DesignWidth="600">
99
<Grid>
10-
<Grid.ColumnDefinitions>
11-
<ColumnDefinition Width="*"/>
12-
<ColumnDefinition Width="Auto"/>
13-
</Grid.ColumnDefinitions>
1410
<esri:MapView x:Name="mapView"
15-
Map="https://www.arcgis.com/home/item.html?id=d4fe39d300c24672b1821fa8450b6ae2"
11+
Map="https://www.arcgis.com/home/item.html?id=9f3a674e998f461580006e626611f9ad"
1612
GeoViewTapped="mapView_GeoViewTapped"/>
17-
<esri:PopupViewer x:Name="popupViewer"
18-
Grid.Column="1"
19-
Padding="5"
20-
Width="300"
21-
Visibility="Collapsed"
22-
HorizontalAlignment="Stretch"
23-
VerticalAlignment="Stretch" />
13+
14+
15+
<Grid Background="#AA333333" Visibility="Collapsed" x:Name="PopupBackground" MouseDown="PopupBackground_MouseDown">
16+
<Border BorderBrush="Black" BorderThickness="1" Background="White" HorizontalAlignment="Center" VerticalAlignment="Center" >
17+
<esri:PopupViewer x:Name="popupViewer" Margin="5" Width="400" MaxHeight="400" />
18+
</Border>
19+
</Grid>
2420
</Grid>
2521
</UserControl>

src/Samples/Toolkit.SampleApp.WPF/Samples/PopupViewer/PopupViewerSample.xaml.cs

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,24 +32,10 @@ private async void mapView_GeoViewTapped(object sender, GeoViewInputEventArgs e)
3232

3333
// Retrieves or builds Popup from IdentifyLayerResult
3434
var popup = GetPopup(result);
35-
36-
// Displays callout and updates visibility of PopupViewer
3735
if (popup != null)
3836
{
39-
var callout = new CalloutDefinition(popup.GeoElement);
40-
callout.Tag = popup;
41-
callout.ButtonImage = InfoIcon;
42-
callout.OnButtonClick = new Action<object>((s) =>
43-
{
44-
popupViewer.Visibility = Visibility.Visible;
45-
popupViewer.PopupManager = new PopupManager(s as Popup);
46-
});
47-
mapView.ShowCalloutForGeoElement(popup.GeoElement, e.Position, callout);
48-
}
49-
else
50-
{
51-
popupViewer.PopupManager = null;
52-
popupViewer.Visibility = Visibility.Collapsed;
37+
PopupBackground.Visibility = Visibility.Visible;
38+
popupViewer.Popup = popup;
5339
}
5440
}
5541
catch (Exception ex)
@@ -115,5 +101,11 @@ private Popup GetPopup(IEnumerable<IdentifyLayerResult> results)
115101

116102
return null;
117103
}
104+
105+
private void PopupBackground_MouseDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
106+
{
107+
PopupBackground.Visibility = Visibility.Collapsed;
108+
popupViewer.Popup = null;
109+
}
118110
}
119111
}

src/Samples/Toolkit.SampleApp.WPF/Toolkit.SampleApp.WPF.csproj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88
<UseWPF>true</UseWPF>
99
<RootNamespace>Esri.ArcGISRuntime.Toolkit</RootNamespace>
1010
<NoWarn>$(NoWarn);NU5105;MC3074;MSB4181;MC1000;MC3066</NoWarn>
11+
</PropertyGroup>
12+
<PropertyGroup Condition="'$([MSBuild]::GetTargetFrameworkIdentifier($(TargetFramework)))'=='.NETFramework'">
13+
<PlatformTarget>AnyCPU</PlatformTarget>
14+
</PropertyGroup>
15+
<PropertyGroup Condition="'$([MSBuild]::GetTargetFrameworkIdentifier($(TargetFramework)))'=='.NETCoreApp'">
1116
<RuntimeIdentifiers>win10-x86;win10-x64;win10-arm64</RuntimeIdentifiers>
1217
</PropertyGroup>
1318

src/Toolkit/Toolkit.Maui/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#if !__IOS__ && !WINDOWS && !__ANDROID__ && !__MACCATALYST__
22
// Make sure net6.0 non-os target clearly states which platforms are supported by the toolkit
3-
[assembly: System.Runtime.Versioning.SupportedOSPlatform("windows10.0.19041")]
3+
[assembly: System.Runtime.Versioning.SupportedOSPlatform("windows10.0.17763")]
44
[assembly: System.Runtime.Versioning.SupportedOSPlatform("android26.0")]
55
[assembly: System.Runtime.Versioning.SupportedOSPlatform("ios14.0")]
66
[assembly: System.Runtime.Versioning.SupportedOSPlatform("maccatalyst14.0")]

src/Toolkit/Toolkit.Maui/Esri.ArcGISRuntime.Toolkit.Maui.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
<EmbeddedResource Include="Assets\x-small.png" />
3333
<EmbeddedResource Include="Assets\x.png" />
3434
<EmbeddedResource Include="Assets\pin-red.png" />
35+
<None Include="build\**\*.*" PackagePath="build;buildTransitive" Pack="true" />
36+
<None Include="Resources\Fonts\calcite-ui-icons-24.ttf" Pack="true" PackagePath="Resources\Fonts" />
3537
</ItemGroup>
3638

3739
<ItemGroup>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
4+
<ItemGroup >
5+
<MauiFont Include="$(MSBuildThisFileDirectory)..\Resources\Fonts\*.*">
6+
<Visible>False</Visible>
7+
</MauiFont>
8+
</ItemGroup>
9+
10+
</Project>

0 commit comments

Comments
 (0)