-
Notifications
You must be signed in to change notification settings - Fork 121
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Initial implementation: FloorFilter for WPF This PR/Commit includes the following: - Docs and a very basic sample - (internal) FilteringListView is a list view with unique search/filter capabilities and an equally unique selection behavior, which is needed to enable the navigation experience in the floor browser. - (internal) FloorFilterController provides most of the filtering, selection, and navigation behavior - FloorFilter UI implementation with rich templating and customization options * Changes from first review * Small fixes to work better with large buildings * Add Xamarin.Forms implementation * Changes from self-review * Xamarin template clean up * Add UWP Adds all features except search/filter for lists * Switch to icon font on UWP * Fix button appearance issues UWP * Add filtering listview to UWP * Fix WPF * Clean up * Fixes and simplification * Changes from review * Label changes and other updates
- Loading branch information
Showing
34 changed files
with
7,328 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# FloorFilter | ||
|
||
FloorFilter allows users to take advantage of floor-aware maps and scenes by surfacing and then filtering floor data. | ||
|
||
![image](https://user-images.githubusercontent.com/29742178/158746908-71a39e28-596f-44b6-9230-e2a04bdaeb9e.png) | ||
|
||
## Features | ||
|
||
- Automatically hides the floor browsing view when the associated map or scene is not floor-aware | ||
- Selects the facility in view automatically | ||
- This behavior can be configured through the `AutomaticSelectionMode` property | ||
- View is space-efficient and can be expanded/collapsed (WPF only) | ||
- Shows the selected facility's levels in proper vertical order | ||
- Filters the map/scene content to show the selected level | ||
- Allows browsing the full floor-aware hierarchy of sites, facilities, and levels | ||
- When consuming simpler maps, simplifies the UI as needed; for example, the site browsing experience is hidden when there is only one (or no) sites | ||
- When browsing, allows dynamic filtering of lists | ||
- Shows the ground floor of all facilities when there is no active selection | ||
- Updates the visibility of floor levels across all facilities (e.g. if you are looking at floor 3 in building A, floor 3 will be shown in neighboring buildings) | ||
- Exposes a full range of template and style properties for easy customization | ||
- Adjusts layout and presentation to work well regardless of positioning - left/right and top/bottom | ||
- Keeps the selected facility visible in the list while the selection is changing in response to map navigation | ||
|
||
## Customization | ||
|
||
> **NOTE**: Some properties aren't available on all platforms due to platform-specific differences in how the view is implemented. | ||
The following properties enable customization of the view: | ||
|
||
- `ZoomToButtonStyle` | ||
- `BrowseButtonStyle` | ||
- `ExpandCollapseButtonStyle` | ||
- `CommonListStyle` - style applied to all lists (levels, sites, facilities) | ||
- `LevelDataTemplate` - displays levels in the non-browsing floor filter experience | ||
- `SiteDataTemplate` - displays sites in the browsing view | ||
- `FacilityDataTemplate` - displays facilities in the browsing view | ||
- `DifferentiatingFacilityDataTemplate` - displays facilities in the list of all facilities from all sites | ||
|
||
The following properties enable customization or localization of text displayed in the view: | ||
|
||
- `BackButtonLabel` | ||
- `AllFacilitiesLabel` | ||
- `AllFloorsLabel` | ||
- `CloseLabel` | ||
- `ExpandLabel` | ||
- `CollapseLabel` | ||
- `ZoomToLabel` | ||
- `BrowseLabel` | ||
- `NoResultsMessage` | ||
- `SearchPlaceholder` | ||
|
||
## Usage | ||
|
||
WPF: | ||
|
||
```xml | ||
<Grid> | ||
<esri:MapView x:Name="MyMapView" /> | ||
<esri:FloorFilter GeoView="{Binding ElementName=MyMapView}" /> | ||
</Grid> | ||
``` | ||
|
||
Xamarin.Forms: | ||
|
||
```xml | ||
<Grid> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="*" /> | ||
<RowDefinition Height="Auto" /> | ||
</Grid.RowDefinitions> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="48" /> | ||
<ColumnDefinition Width="*" /> | ||
</Grid.ColumnDefinitions> | ||
<esri:MapView | ||
x:Name="MyMapView" | ||
Grid.RowSpan="2" | ||
Grid.ColumnSpan="2" /> | ||
<toolkit:FloorFilter | ||
Grid.Row="1" | ||
Grid.Column="0" | ||
Margin="8,8,8,32" | ||
GeoView="{x:Reference MyMapView}" /> | ||
</Grid> | ||
``` | ||
|
||
UWP: | ||
|
||
```xml | ||
<Grid> | ||
<esri:MapView x:Name="MyMapView" /> | ||
<esri:FloorFilter GeoView="{Binding ElementName=MyMapView}" /> | ||
</Grid> | ||
``` |
16 changes: 16 additions & 0 deletions
16
src/Samples/Toolkit.SampleApp.UWP/Samples/FloorFilter/FloorFilterSample.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<Page | ||
x:Class="Esri.ArcGISRuntime.Toolkit.SampleApp.Samples.FloorFilter.FloorFilterSample" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:converter="using:Esri.ArcGISRuntime.Toolkit.Internal" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:esri="using:Esri.ArcGISRuntime.UI.Controls" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:toolkit="using:Esri.ArcGISRuntime.Toolkit.UI.Controls" | ||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}" | ||
mc:Ignorable="d"> | ||
<Grid> | ||
<esri:MapView x:Name="MyMapView" /> | ||
<toolkit:FloorFilter GeoView="{Binding ElementName=MyMapView}" /> | ||
</Grid> | ||
</Page> |
15 changes: 15 additions & 0 deletions
15
src/Samples/Toolkit.SampleApp.UWP/Samples/FloorFilter/FloorFilterSample.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using Esri.ArcGISRuntime.Mapping; | ||
using System; | ||
using Windows.UI.Xaml.Controls; | ||
|
||
namespace Esri.ArcGISRuntime.Toolkit.SampleApp.Samples.FloorFilter | ||
{ | ||
public sealed partial class FloorFilterSample : Page | ||
{ | ||
public FloorFilterSample() | ||
{ | ||
InitializeComponent(); | ||
MyMapView.Map = new Esri.ArcGISRuntime.Mapping.Map(new Uri("https://www.arcgis.com/home/item.html?id=b4b599a43a474d33946cf0df526426f5")); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
src/Samples/Toolkit.SampleApp.WPF_Net5/Samples/FloorFilter/SimpleFloorFilterSample.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<UserControl | ||
x:Class="Esri.ArcGISRuntime.Toolkit.Samples.FloorFilter.SimpleFloorFilterSample" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
d:DesignHeight="400" | ||
d:DesignWidth="600" | ||
mc:Ignorable="d"> | ||
<Grid> | ||
<esri:MapView x:Name="MyMapView" /> | ||
<esri:FloorFilter GeoView="{Binding ElementName=MyMapView}" /> | ||
</Grid> | ||
</UserControl> |
16 changes: 16 additions & 0 deletions
16
src/Samples/Toolkit.SampleApp.WPF_Net5/Samples/FloorFilter/SimpleFloorFilterSample.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
|
||
using Esri.ArcGISRuntime.Mapping; | ||
using System; | ||
using System.Windows.Controls; | ||
|
||
namespace Esri.ArcGISRuntime.Toolkit.Samples.FloorFilter | ||
{ | ||
public partial class SimpleFloorFilterSample: UserControl | ||
{ | ||
public SimpleFloorFilterSample() | ||
{ | ||
InitializeComponent(); | ||
MyMapView.Map = new Esri.ArcGISRuntime.Mapping.Map(new Uri("https://www.arcgis.com/home/item.html?id=b4b599a43a474d33946cf0df526426f5")); | ||
} | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
src/Samples/Toolkit.Samples.Forms/Toolkit.Samples.Forms/Samples/FloorFilterSample.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<ContentPage | ||
x:Class="Toolkit.Samples.Forms.Samples.FloorFilterSample" | ||
xmlns="http://xamarin.com/schemas/2014/forms" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
xmlns:d="http://xamarin.com/schemas/2014/forms/design" | ||
xmlns:esri="clr-namespace:Esri.ArcGISRuntime.Xamarin.Forms;assembly=Esri.ArcGISRuntime.Xamarin.Forms" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:toolkit="clr-namespace:Esri.ArcGISRuntime.Toolkit.Xamarin.Forms;assembly=Esri.ArcGISRuntime.Toolkit.Xamarin.Forms" | ||
Title="FloorFilter - MapView" | ||
mc:Ignorable="d"> | ||
<ContentPage.Content> | ||
<Grid> | ||
<Grid.RowDefinitions> | ||
<RowDefinition Height="*" /> | ||
<RowDefinition Height="Auto" /> | ||
</Grid.RowDefinitions> | ||
<Grid.ColumnDefinitions> | ||
<ColumnDefinition Width="48" /> | ||
<ColumnDefinition Width="*" /> | ||
</Grid.ColumnDefinitions> | ||
<esri:MapView | ||
x:Name="MyMapView" | ||
Grid.RowSpan="2" | ||
Grid.ColumnSpan="2" /> | ||
<toolkit:FloorFilter | ||
x:Name="FF" | ||
Grid.Row="1" | ||
Grid.Column="0" | ||
Margin="8,8,8,32" | ||
GeoView="{x:Reference MyMapView}" /> | ||
</Grid> | ||
</ContentPage.Content> | ||
</ContentPage> |
18 changes: 18 additions & 0 deletions
18
src/Samples/Toolkit.Samples.Forms/Toolkit.Samples.Forms/Samples/FloorFilterSample.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
using Esri.ArcGISRuntime.Mapping; | ||
using System; | ||
using Xamarin.Forms; | ||
using Xamarin.Forms.Xaml; | ||
|
||
namespace Toolkit.Samples.Forms.Samples | ||
{ | ||
[XamlCompilation(XamlCompilationOptions.Compile)] | ||
[SampleInfoAttribute(Category = "FloorFilter", Description = "Demonstrates FloorFilter with a floor-aware map.")] | ||
public partial class FloorFilterSample : ContentPage | ||
{ | ||
public FloorFilterSample() | ||
{ | ||
InitializeComponent(); | ||
MyMapView.Map = new Esri.ArcGISRuntime.Mapping.Map(new Uri("https://www.arcgis.com/home/item.html?id=b4b599a43a474d33946cf0df526426f5")); | ||
} | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.