Shapefile Map Tips Feature Label
We've multiple different shapefiles of the same data but have deleted and rearranged fields. So our question is does anybody know the order of operations of how the feature label is generated?
For example, is it grabbing the first text field? If theres no text field is it grabbing the FID etc etc.
Through our testing, we could not figure out a pattern.
0
-
Hi Jennifer,
It looks like the logic checks whether any of the fields distinctly contain the words "name", "label", or "title"? Technically, it is testing if any of them match these regex expressions:
(?:^|\\b|_)name(?:$|\\b|_)
(?:^|\\b|_)label(?:$|\\b|_)
(?:^|\\b|_)title(?:$|\\b|_)
So "bla_name" will match, but "blaname" will not.
The list of words that it searches for using this pattern is configurable in your viewer config file (ie C:\Program Files (x86)\Latitude Geographics\Geocortex Essentials\Default\REST Elements\Sites\SITENAME\Viewers\VIEWERNAME\VirtualDirectory\Resources\Config\Default\SHELLNAME.json.js). If you open the file in a text editor like Notepad, you can search for "featureLabel" to find it. It will be under "autoDetectionTerms" in the "TableMappingDialogViewModel".
If Upload Data finds one of those words, it'll use the first field that was a match. Otherwise, it looks like it would use the first field in the shapefile, which is typically a FID/Object ID field.0
Please sign in to leave a comment.
Comments
1 comment