Click or drag to resize

MapStyle Class

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
A map style is a compiled representation of a Chameleon script. For more information on writing Chameleon scripts, see the Chameleon section of the User's Guide.
Inheritance Hierarchy
SystemObject
  Telogis.GeoBaseMapStyle

Namespace:  Telogis.GeoBase
Assembly:  geobase.net (in geobase.net.dll) Version: 4.89.0.0
Syntax
public class MapStyle

The MapStyle type exposes the following members.

Properties
  NameDescription
Public propertyStatic memberDefaultStyle
Returns the default MapStyle.
Public propertyDescription
The user-assigned description of this MapStyle (for convenience purposes).
Public propertyId
A combination of name and version CAM file properties. If either of these properties are undefined, the Id will fallback to the SourceHash.
Public propertyStatic memberLegacyStyle
Returns the legacy MapStyle, matching the map style used in releases prior to GeoBase 4.0.
Public propertyStatic memberMobileStyle
Returns the mobile MapStyle; a cut down style designed for use on resource limited hardware or for applications focused on Navigation.
Public propertyName
The user-assigned name of this MapStyle (for convenience purposes).
Public propertyParameterNames
Get a list of settable parameters. This list will contain all the parameters defined in the loaded Chameleon script (.CAM) file.
Public propertyStatic memberTransparentStyle
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.
Public propertyVersion
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.
Top
Methods
  NameDescription
Public methodCode exampleClearParameter
Clear the parameter to the Unset state.
Public methodClone
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.
Public methodStatic memberCreate(Stream)
Create a MapStyle from the given stream.
Public methodStatic memberCreate(String)
Create a MapStyle from the given file.
Public methodStatic memberCreate(Stream, ArrayList, Boolean)
Create a MapStyle from the Chameleon code in the given stream.
Public methodStatic memberCreate(String, ArrayList, Boolean)
Create a style from a file.
Public methodStatic memberCreate(Stream, ArrayList, ArrayList, Boolean)
Create a MapStyle from the Chameleon code in the given stream.
Public methodStatic memberCreate(String, ArrayList, ArrayList, Boolean)
Create a style from a file.
Public methodStatic memberCreateFromBinary
Creates a MapStyle from a file saved in a binary format.
Public methodStatic memberCreateFromEncrypted
Create a MapStyle from the given stream. The stream must contain an encrypted Chameleon script.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodCode exampleGetParameterValue
Gets the value of the specified parameter. The parameter will be set in the Chameleon .CAM file using the PARAMETER %param = 1 syntax.
Public methodCode exampleGetProperty
Gets a Property value by name.
Public methodCode exampleGetPropertyNames
Get names of available properties.
Public methodGetTemplateVariable
Retrieve the value of a named template variable.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodCode exampleHasParameter
Determines if a specified parameter exists. The parameter will be specified in the Chameleon .CAM file using the PARAMETER %param = 1 syntax.
Public methodSaveToBinary
Save the current style in a binary format.
Public methodCode exampleSetParameter(String, Boolean)
Set a parameter to a boolean value.
Public methodSetParameter(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.
Public methodSetTemplateVariable
Assign a value to a named template variable to the MapStyle.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Remarks

Related articles: Chameleon Custom Map Styles.

Examples

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.

C#
// 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

}
See Also