Maptitude GISDK Help |
Set the display names for units, to be used in drop-down lists and legends.
Added to Version 2016.
SetDisplayUnits(array mapping)
Argument |
Contents |
mapping |
An array of unit names in your language, where each element is a two-element array in the form {UnitName, {Singular, Plural, Abbrev}} |
Element |
Type |
Contents |
1 |
String |
The Caliper unit name (in singular US English), e.g., "Meter" |
2 |
Array |
Strings containing the desired display name in singular form (e.g. "Metre"), plural form (e.g. "Metres"), and abbreviated (e.g. "m") |
You can publish maps with your local language in the legend, using the Language drop-down list in the System tab of the Edit-Preferences command.
If your language is not listed, you can use SetDisplayUnits() to change the display unit choices to your language.
SetDisplayUnits({{"Meter", {"Metre", "Metres", "m"}},{"Kilometer", {"Kilometre",
"Kilometres", "km"}}})
SetMapUnits("Kilometers") // SetMapUnits takes US unit names
x = GetMapUnits("display plural") // returns "Kilometres"
Error Type |
Meaning |
Error |
The specification array is invalid |
Function |
Summary |
Gets a list of the available area measurement units |
|
Gets the current area measurement units |
|
Gets a list of the available map measurement units |
|
Gets the current map measurement units |
|
Gets a list of the available paper measurement units |
|
Gets the current paper measurement unit |
|
Sets the current area measurement units |
|
Sets the current map measurement units |
|
Sets the current paper measurement unit |
©2025 Caliper Corporation | www.caliper.com |