Create New Feature tool
I'm adding the Create New Feature tool to a toolbar and am looking for some information on the Command Parameter. It looks like it's expecting a layer but I can't figure out the format that it is expecting it in. Has anybody used this before?
0
-
Steve,
I launch the Create New Feature tool from the Home Panel, and it uses the following...
<a href="command:ShowFeatureTemplatePicker">Add Observation</a>
I assume the same would be used from a toolbar's button ?
Hope that helps.
GF0 -
the actual json code is in the Desktop.json.js file
{
"id": "CreateNewFeatureButton",
"type": "toggleButton",
"name": "Add Feature",
"tooltip": "Add a new fuel treatment / tactical on the map",
"iconUri": "Resources/Images/Icons/Toolbar/edit-24.png",
"hideOnDisable": false,
"toggleStateName": "FeaturePlacementState",
"toggleOn": {
"command": "ShowFeatureTemplatePicker",
"commandParameter": null
},0 -
The last line in the CreateNewFeatureButton excert from the json file is commandParameter: null.
I'm looking for the proper json formating to add a feature to a specific layer.0 -
I've never included the layer parameter and haven't run into issues, but most of the viewers I've developed have only included a handful at most of editable feature layers and ususally that's just for attribute updates so no distinction is required. I see in the Viewer Commands reference (https://docs.geocortex.com/essentials/gvh/2.10/commands-help/#/commands/Editing/ShowFeatureTemplatePicker) that the parameter is a "layer" but I suspect that this means the GCE map service id for the feature layer that you want to create in. 0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
4 kommentarer