Is it possible to automatically deactivate snapping and turn off the 'Use Crosshair' tool that is turned on when using the measure tool and showing the display geometry toolbar command
Our users would prefer to be able to measure without snapping and the crosshair tool turned on by default so it would be really useful to turn this off when the geometry toolbar is opened so that they do not have to.
-
Hi Harry.
Currently, the settings in the geometry toolbar are remembered only during a 'session' - restarting the app resets those settings.
That said - I think your feedback here is very valuable - so I've put a story in our backlog to have these settings persist from session to session. A user would still have to set them the first time they ran the app - but once set we would remember them.
We should be able to pull this in for our 5.12 release in April.
Thx for the thought!
Cheers,
Cam
0 -
Hi Cam,
That's great thanks for getting back to me, I look forward to seeing this functionality in April!
In relation to the geometry toolbar, do you think it will be possible in the future to complete multiple measurements at once without clearing the previous?
Thanks,
Harry
0 -
You can do this with a workflow
To disable snapping:
Typically, first, you would run the commands "sketching.capture-geometry" and "geometry-toolbar.show". Then, you can run the operation "sketching.set-snapping" with parameter ={"maps" : [ $map.map.mapExt ], "snappingEnabled": "false"}
Turn the crosshair on:
I haven't tried this, but I guess you coud run the command "sketching.set-interaction-mode" with argument ={"editorInteractionMode": "centerCrosshair"}
0 -
Thank you Jostein, this is helpful to know.
I have tried to use the commands / operation as you suggested but unfortunately this did not work in Geocortex Mobile for me. Attached is the workflow I would ideally like to be able to run, and as you can see it is very simple. The geometry-toolbar.show command works fine but it is the sketching.set-snapping operation I am having trouble with, is there any documentation on this do you know? I was unable to find a reference to this operation in the Commands, Operation and Events reference page found here: https://developers.geocortex.com/docs/mobile/api-commands-operations-events#definition-SetInteractionModeArgs
Many thanks,
Harry
0 -
I got info about the sketching.set-snapping from inside VertiGIS, and I see it's not documented yet. For the geometry-toolbar.show, I think you have to reference a mapExt-object as I mentioned above ("maps" : [ $map.map.mapExt ]. You get the $map with the Get Map activity). The same applies to the sketching.set-snapping. You don't have any reference to any mapExt-object in your sample. I run the sketching.capture-geometry command before all this. Maybe that could have effect on the following commands and operation
0 -
Thank you for confirming Jostein, I happy to confirm I have now got the sketching.set-snapping operation to work so thank you very much for your help with this.
I am however still struggling to get the crosshair tool to operate as I require, ideally rather than turning it on, I would instead like the user to be able to run the workflow and have an operation to turn the crosshair tool off. Again, this is not yet in the documentation and it does not appear to operate as a boolean operation, do you perhaps know what the argument for this operation should be, rather than ={"editorInteractionMode": "centerCrosshair"}?
Many thanks, Harry
0 -
In the current release (5.11), you can use the following command to change the interaction mode through workflow:
sketching.set-interaction-mode
Details are here:
https://developers.geocortex.com/docs/mobile/api-commands-operations-events
In 5.12, which will be releasing shortly (hopefully this week), the editor will actually automatically remember the user's last used settings, and that might be good enough.
As well, you will be able to force some settings by invoking:
map.start-sketch
and pass in:
{
"editorSettings": {
"snappingEnabled": true|false,
"showBearings": true|false,
"editorGeometryMode": "line" | "area",
"editorInteractionMode": "centerCrosshair" | "freehand"
}
}
Each of the properties mentioned above (snappingEnabled, etc.) is optional, and will default to the last remembered value from the user's preference if not passed in a second time.
0 -
Hi Jeff, that's great, thank you very much! With a combination of your answer and Jostein's answer I am happy to report I have now been able to achieve what I needed for our user using a simple workflow and a string of run command and run operation activities.
Many thanks,
Harry
0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
8 kommentarer