How do you configure predefined Markup / Drawing styles?
I'm trying to define specific styles for users to use that are preloaded with the drawing tools. Ideally, I would like to name a handful of point, line, and polygon drawing tools and define/config their attributes... color, size, etc. I'm looking at the documentation here:
https://docs.geocortex.com/essentials/gvh/2.10/admin-help/Default.htm#gvh/admin/modules/markup-module.htm
...and it would appear the HTML5 viewer should support this but there are no examples provided and the documentation is a bit thin.
I tried adding the
StyleSelectorViewModel to the desktop.json.js config file but when the viewer loads, it reports this viewmodel is not found and it hangs.
Can someone provide a working sample of this or point me to a KB article on defining drawing tool styles?
0
-
Hi Lance,
To create new symbols, you can either create a new symbol library, or add to an existing one.
Symbol libraries are stored here:
"C:\Program Files (x86)\Latitude Geographics\Geocortex Essentials\Default\REST Elements\Sites\Resources\Symbols" (default location)
For example, if you want to add some point symbols, open the "point" folder and there are 3 libraries in here. Open one in a text editor and you will see the json symbol configuration in here. You can add some more symbols in here. You can create them using json from the ESRI Symbols playground site:
https://developers.arcgis.com/javascript/3/samples/playground/index.html
If you have a number of symbols you would like to use, you can create a library and save it in here. E.g. MyPoints.json
Then you will have to refer to this library in your viewer desktop.json.js:
i.e.:
"id": "MarkupTemplateSelectorViewModel",
"type": "geocortex.essentialsHtmlViewer.mapping.modules.markup.MarkupTemplateSelectorViewModel",
"require": "Mapping/modules/Markup/MarkupStyles/MarkupTemplateSelector/MarkupTemplateSelectorViewModel",
"configuration": {
"pointLibraries": [
"Solid",
"Hollow",
"Black Outline",
"MyPoints"
],
"lineLibraries": [.......
Reload your viewer and you should have your symbology available.
Thanks,
Marion.0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
1 kommentar