measure tool label placement?
Is there a way to change the Total distance label in the measure tool (polyline) so that is offset a somewhat from the line segment/s? We occasionally see a scenario where the total label covers up 1 or more of the segment distances.
0
-
Allen,
I had that same complaint. So I came up with a solution that you can see here: https://support.geocortex.com/essentialsGSCForum?sub-nav=forum&main-nav=essentials&#!/feedtype=SINGLE_QUESTION_DETAIL&id=906600000000BfGAAU
And I think they put it in the code gallery as well.
Let me know if you have questions and I'd be glad to help
Marshall0 -
That's great Marshall - thanks. I think for now just the edit to the Mapping.js should take of this, but I'll play around with the remove labels piece of this as time allows. 0 -
That's awesome Marshall! Thanks for sharing! 0 -
Hi all,
As of HTML5 viewer version 2.10, a setting was added to the MeasurementViewModel in the viewer configuration to set how far away from the line the total measurement label should be offset. This setting, "polylineLabelOffset", is not accessible from Manager, so you need to add it manually to the viewer config file of you want to use it. To use this setting:- Navigate to the viewer's dekstop config file. The default location is: C:\Program Files (x86)\Latitude Geographics\Geocortex Essentials\Default\REST Elements\Sites\SITENAME\Viewers\VIEWERNAME\VirtualDirectory\Resources\Config\Default\Desktop.json.js
- Backup the file and edit the original in a text editor like Notepad
- Use CTRL + F to search for "id": "MeasurementViewModel"
- In the list of configuration properties below, add a new line at the bottom:
, "polylineLabelOffset": 50(use whatever number you want instead of 50, the default is 5 if it is not set). Example:{ "id": "MeasurementViewModel", "type": "geocortex.essentialsHtmlViewer.mapping.modules.measurement.MeasurementViewModel", "configuration": { "markupLayerName": "Drawings", "lineColor": "#0000FF", "fillColor": "#6495ED", "textColor": "#000000", "highlightColor": "#FFFFFF", "outlineColor": "#000000", "outlineWidth": "1", "totalMeasurementTextColor": "#FFFFFF", "totalMeasurementHighlightColor": "#000000", "totalMeasurementOutlineColor": "#FFFFFF", "totalMeasurementOutlineWidth": "2", "highlightRadius": "5", "textSize": "12px", "addMarkupToMapByDefault": true, "polylineLabelOffset": 50 } } - Save the file and test the viewer
- Repeat for Tablet.json.js and Handheld.json.js if necessary
-Amanda0 -
Defenitily helpful. thanks Amanda. 0
Du måste logga in om du vill lämna en kommentar.
Kommentarer
5 kommentarer