I've noticed that with the update to version 5 of the ArcGIS JS API there have been tweaks to the sketchviewmodel that seem to imply the existence of a new plugin pattern? The documentation and types information currently does not link to a working page in the docs?
https://developers.arcgis.com/javascript/latest/references/core/widgets/Sketch/SketchViewModel/#create
Hi there, thanks for your interest in the 5.0 release of the ArcGIS Maps SDK for JavaScript.
There is a new (internal) plugin model under the hood, which is what powers some of the exciting new capabilities in this release, including support for creating true curves.
We're not quite ready to share more details or make an API available. We still have some more work to do to define a great developer experience. Unfortunately, that internal type was inadvertently included in the documentation.
Do you have a particular use case in mind for a SketchViewModel plugin sysem?
I think using SketchViewModel is the right approach as long as it meets your needs.
I'm curious, if SketchViewModel supported segment labels in 2D in a manner similar to support in 3D, do you think that would be able to replace MeasurementLineSketchViewModel? If so, would you need to configure the units of measure on the viewmodel, or is that configuration being managed centrally through the user/portal configuration?
You can see segment labels for 3D here: https://developers.arcgis.com/javascript/latest/sample-code/sketch-3d/
Our current method for adding customised functionality on top of the sketchview model has been to create subclasses of the sketchviewmodel extending parts of its functionality.
We currently have two main use cases.
I have attached a video showing the two workflows (the measurements editing is a bit laggy due to a now resolved bug):
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.