MapStyle Class |
Namespace: Telogis.GeoBase
The MapStyle type exposes the following members.
Name | Description | |
---|---|---|
DefaultStyle |
Returns the default MapStyle.
| |
Description |
The user-assigned description of this MapStyle (for convenience purposes).
| |
Id |
A combination of name and version CAM file properties. If either of these properties are undefined, the Id will
fallback to the SourceHash.
| |
LegacyStyle |
Returns the legacy MapStyle, matching the map style used in releases prior to GeoBase 4.0.
| |
MobileStyle |
Returns the mobile MapStyle; a cut down style designed for use on resource limited hardware
or for applications focused on Navigation.
| |
Name |
The user-assigned name of this MapStyle (for convenience purposes).
| |
ParameterNames |
Get a list of settable parameters. This list will contain all the parameters defined in the loaded Chameleon
script (.CAM) file.
| |
TransparentStyle |
Returns a map style that produces blank transparent maps. It still calls IMapRenderers,
so that information can be rendered on the map, but it renders no map data itself.
| |
Version |
The user-assigned version of this MapStyle. When the this property is manually updated, it signals that the MapStyle
change is of a magnitude enough to validate the map.
|
Name | Description | |
---|---|---|
ClearParameter |
Clear the parameter to the Unset state.
| |
Clone |
Clones a MapStyle. This allows multiple Maps to be created using the same underlying
MapStyle, but with different parameters. Multiple Maps may share a single MapStyle if
they are all to be rendered with identical settings.
| |
Create(Stream) |
Create a MapStyle from the given stream.
| |
Create(String) |
Create a MapStyle from the given file.
| |
Create(Stream, ArrayList, Boolean) |
Create a MapStyle from the Chameleon code in the given stream.
| |
Create(String, ArrayList, Boolean) |
Create a style from a file.
| |
Create(Stream, ArrayList, ArrayList, Boolean) |
Create a MapStyle from the Chameleon code in the given stream.
| |
Create(String, ArrayList, ArrayList, Boolean) |
Create a style from a file.
| |
CreateFromBinary |
Creates a MapStyle from a file saved in a binary format.
| |
CreateFromEncrypted |
Create a MapStyle from the given stream. The stream must contain
an encrypted Chameleon script.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetParameterValue |
Gets the value of the specified parameter. The parameter will be set in the Chameleon .CAM file
using the PARAMETER %param = 1 syntax.
| |
GetProperty |
Gets a Property value by name.
| |
GetPropertyNames |
Get names of available properties.
| |
GetTemplateVariable |
Retrieve the value of a named template variable.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
HasParameter |
Determines if a specified parameter exists. The parameter will be specified in the Chameleon .CAM file
using the PARAMETER %param = 1 syntax.
| |
SaveToBinary |
Save the current style in a binary format.
| |
SetParameter(String, Boolean) |
Set a parameter to a boolean value.
| |
SetParameter(String, Single) |
Set a parameter to a (positive) float value. Negative values are not allowed.
If the given parameter does not exist, no action will be taken.
| |
SetTemplateVariable |
Assign a value to a named template variable to the MapStyle.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Related articles: Chameleon Custom Map Styles.
The code example below uses the Create(String) method to instantiate a MapStyle object. This method will return null if any errors occur. Create Overload, such as Create(String, ArrayList, Boolean) allow the compile errors (if any) to be inspected.
// Load a custom MapStyle from disk - this is a plain-text file, with // syntax described in the Chameleon section of the GeoBase help. MapStyle myStyle = MapStyle.Create(@"C:\some_directory_path\myStyle.cam"); if (myStyle != null) { // apply the MapStyle to our MapCtrl myMapCtrl.Style = myStyle; } else { // handle error }