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?
Solved! Go to Solution.
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?
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?
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):
An option to build in functionality with a plugin system sounds like it might be a more formalised approach. I appreciate that it might make more sense at some stage for us to reach for the draw api instead, however the sketchview model and its visual elements / in built editing behaviour, work really nicely and can't be simply replicated.
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/