Skip to content
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

FeatureLayer Client-side Graphics method fixes #277

Merged
merged 3 commits into from
Dec 19, 2023

Conversation

TimPurdum
Copy link
Collaborator

Closes #275

  • You can now define an empty Source parameter like below (C#12 syntax). This makes it possible to start with an empty layer and then add graphics later programmatically.
<FeatureLayer Source="@([])">
  • Discovered that an empty layer like above never calls layerview-create, and thus isn't "registered" in GeoBlazor with a JSObjectReference. Fixed ApplyEdits to also call Load first if the object ref isn't set.
  • Added specific thrown exceptions to FeatureLayer.Add(Graphic graphic) and FeatureLayer.Remove(Graphic graphic) methods if these are called after the layer is rendered, because ArcGIS Feature Layers do not support updating graphics this way.
  • Did some cleanup on ImageryLayer and the related renderers to remove broken code that was either not converting correctly in TypeScript, or was trying to set read-only fields
  • Changed Label.LabelPlacement to be an enum instead of a string. While this is technically a breaking change, I did discover a bug when the value would round-trip from ArcGIS, where ArcGIS returned values like esriServerPointLabelPlacementAboveCenter, so this also fixes that bug.
  • Removed broken Pro code in Layer.Load
  • Updated testRunner.js to use a better injection pattern for extending GeoBlazor.

}
catch (Exception ex)
{
Console.WriteLine(ex);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be a console log?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, I've never hooked up GeoBlazor to ILogger, although I suppose we could/should. Since it's a library, I wasn't sure how I felt about "pushing" log messages to someone's logger implementation? Anyways, that seems like it should be it's own library-wide gissue. Let's talk about it more.

…oScreen point conversions, missing xml comments in JsModuleManager
@TimPurdum TimPurdum merged commit f441fd3 into develop Dec 19, 2023
@TimPurdum TimPurdum deleted the bug/275-empty-feature-layer branch December 19, 2023 02:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot Create an Empty FeatureLayer for Client-side Graphics
2 participants