-
Notifications
You must be signed in to change notification settings - Fork 518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Geometry Editor #1251
Geometry Editor #1251
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great job, @williambohrmann3! All samples are looking very polished.
I just reviewed the WPF bits but most of my suggestions probably apply to other platforms. Please feel free to apply only what you think is necessary. Like if samples team have a prescribed way of doing things, then go with consistency. I think most of my comments are for readability or making things concise.
...F/WPF.Viewer/Samples/GraphicsOverlay/CreateAndEditGeometries/CreateAndEditGeometries.xaml.cs
Show resolved
Hide resolved
...F/WPF.Viewer/Samples/GraphicsOverlay/CreateAndEditGeometries/CreateAndEditGeometries.xaml.cs
Show resolved
Hide resolved
...F/WPF.Viewer/Samples/GraphicsOverlay/CreateAndEditGeometries/CreateAndEditGeometries.xaml.cs
Outdated
Show resolved
Hide resolved
...F/WPF.Viewer/Samples/GraphicsOverlay/CreateAndEditGeometries/CreateAndEditGeometries.xaml.cs
Outdated
Show resolved
Hide resolved
...F/WPF.Viewer/Samples/GraphicsOverlay/CreateAndEditGeometries/CreateAndEditGeometries.xaml.cs
Outdated
Show resolved
Hide resolved
...F/WPF.Viewer/Samples/GraphicsOverlay/CreateAndEditGeometries/CreateAndEditGeometries.xaml.cs
Outdated
Show resolved
Hide resolved
...F/WPF.Viewer/Samples/GraphicsOverlay/CreateAndEditGeometries/CreateAndEditGeometries.xaml.cs
Outdated
Show resolved
Hide resolved
...F/WPF.Viewer/Samples/GraphicsOverlay/CreateAndEditGeometries/CreateAndEditGeometries.xaml.cs
Show resolved
Hide resolved
src/WPF/WPF.Viewer/Samples/GraphicsOverlay/CreateAndEditGeometries/CreateAndEditGeometries.xaml
Outdated
Show resolved
Hide resolved
...F/WPF.Viewer/Samples/GraphicsOverlay/CreateAndEditGeometries/CreateAndEditGeometries.xaml.cs
Outdated
Show resolved
Hide resolved
Missing nuget package updates to 200.2 |
Slightly unintuitive UI when you can select the |
|
||
## Additional information | ||
|
||
The sample opens with the ArcGIS Imagery basemap centered on the island of Inis Me�in (Aran Islands) in Ireland. Inis Me�in comprises a landscape of interlinked stone walls, roads, buildings, archaeological sites, and geological features, producing complex geometrical relationships. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The á
character is not rendering properly in the sample viewer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we change the text to Inishmaan unless you know of a workaround?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for this case just use a
rather than á
it's close enough for our purposes.
<UserControl.Resources> | ||
<FontFamily x:Key="Calcite">/Resources/Fonts/calcite-ui-icons-24.ttf#calcite-ui-icons-24</FontFamily> | ||
</UserControl.Resources> | ||
<Grid> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UI looks a little cramped and maybe a little too large.
xmlns:esriUI="clr-namespace:Esri.ArcGISRuntime.Maui;assembly=Esri.ArcGISRuntime.Maui"> | ||
<Grid> | ||
<esriUI:MapView x:Name="MyMapView" GeoViewTapped="MyMapView_GeoViewTapped" /> | ||
<Grid Margin="5,5,5,5" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UI doesn't fit on the screen on mobile in horizontal orientation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a few comments just now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update, just few more questions; but otherwise, I think it's much closer to done!
|
||
// Account for case when vertex tool is selected and geometry editor is started with a polyline or polygon geometry type. | ||
// Ensure point and multipoint buttons are only enabled when the selected tool is a vertex tool. | ||
PointButton.IsEnabled = MultipointButton.IsEnabled = !_geometryEditor.IsStarted && tool is VertexTool; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed when DisableOtherGeometryButtons(..)
was called by start polyline/polygon button click?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe this is technically necessary. But is it worth adding a geometry editor type conditional check around this?
...F/WPF.Viewer/Samples/GraphicsOverlay/CreateAndEditGeometries/CreateAndEditGeometries.xaml.cs
Show resolved
Hide resolved
...F/WPF.Viewer/Samples/GraphicsOverlay/CreateAndEditGeometries/CreateAndEditGeometries.xaml.cs
Outdated
Show resolved
Hide resolved
...F/WPF.Viewer/Samples/GraphicsOverlay/CreateAndEditGeometries/CreateAndEditGeometries.xaml.cs
Outdated
Show resolved
Hide resolved
GeometryType geometryType = _selectedGraphic.Geometry.GeometryType; | ||
if (geometryType == GeometryType.Point || geometryType == GeometryType.Multipoint) | ||
{ | ||
ToolComboBox.SelectedIndex = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want VertexTool to always be the default.
Allowing users to change it to Freehand when Polyline/Polygon seem enough. Which you're doing by handling the ComboBox.SelectionChanged
event
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If user has freehand tool enabled, selects a polyline/polygon, no need to change the tool to vertex tool. But if they have freehand tool enabled, select a point/multipoint, it is necessary to change the tool to a vertex tool.
...F/WPF.Viewer/Samples/GraphicsOverlay/CreateAndEditGeometries/CreateAndEditGeometries.xaml.cs
Show resolved
Hide resolved
_polygonSymbol = new SimpleFillSymbol(SimpleFillSymbolStyle.Solid, Color.FromArgb(70, 255, 0, 0), polygonLineSymbol); | ||
|
||
// Create geometry objects from JSON formatted strings. | ||
var houseCoordinates = (MapPoint)Geometry.FromJson |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd pull these json strings out of the method as constant strings, it just tidies up readability. We do this in other samples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking better!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks 👍
Checks are failing because of lowercase screenshot name for MAUI. |
Looks like the README check is failing as the metadata is inconsistent, the difference is that I think it is expecting a .png image but we are using a .jpg for our screenshot. I'll take a look at the check. |
The checks are failing because the screenshot should be a |
Description
Type of change
Platforms tested on
Checklist