What layer does OOTB Text drawing tool place graphics?
We are trying to make a tool with a workflow that lets the user select features on the map then pick an attribute from the feature and it will place a text graphic right under the feature with the value of that attribute. Then we need to be able to use the OOTB edit tool to move and rotate and resize the text. We noticed that when using the UpdateGraphicsLayer activity that we pass in our own graphics layer id like "LabelGraphics" when we place each one that the OOTB edit tool doesn't enable so we can't use it to move and rotate the text graphic. But when we use the OOTB text tool to place a text graphic the edit tool enables just fine. Basically, what are we missing to be able to use a workflow to place a text graphic then be able to move, rotate and resize it with the edit tool? Do we just need to put a specific graphic layer ID in the activity? Something like "Geocortex Drawing Layer" or "Secret Graphic Layer"?
0
-
In the default markup layer, the name is configured in the viewer configuration files. "markupLayerName": "Drawings"0 -
Even after using UpdateGraphicsLayer activity to place a text symbol in the "Drawings" layer they still aren't editable by the OOTB edit tool. We also noticed that when using the "Drawings" layer the text symbols are overwritten by whatever text value set in the renderer so that all the labels read the same value. But if we put each into their own layer such as "LabelLayer" + index to make "LabelLayer1", "LabelLayer2", etc. then each text value gets its own correct value. This happens even if we set the Render Takes Precendence option to True or False.
How do we place a text graphic the same way your OOTB Text tool places them so they can be edited later with the edit tool? Given some selected feature, some selected attribute from that feature, place a text graphic there the same way the OOTB Text tool does with the text set to the value from that feature's attribute.0 -
Hi Josh,
In order to be editable, you would need to add it as markup, using one of the markup commands (https://docs.geocortex.com/essentials/gvh/latest/commands-help/#/commands/Markup) .
There are two additional graphics layers of interest that exist on the map by default, "snapping_graphics" and "snapping_helper_graphics"; I have noticed that you can get some interaction with the graphics when you use these as well in UpdateGraphicsLayer, but I don't think there's any intention for them to be used this way. Markup is the only reliable answer, but I don't know that you'll be able to choose the symbology when using the OOTB markup commands. This would likely be something that would require custom code or an Idea post.
Hope that helps,
-Amanda0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
3 Kommentare