Click or drag to resize

PartialCamRenderer Class

Verizon Connect Logo
Print this page
Learn more about Verizon Connect GeoBase.
Get information about the latest release
Provides a means to apply partial cam files to a GeoBase map.
Inheritance Hierarchy
SystemObject
  Telogis.GeoBasePartialCamRenderer

Namespace:  Telogis.GeoBase
Assembly:  geobase.net (in geobase.net.dll) Version: 4.87.0.0
Syntax
public class PartialCamRenderer : IMapRenderer

The PartialCamRenderer type exposes the following members.

Constructors
  NameDescription
Public methodPartialCamRenderer
Initializes a new instance of the PartialCamRenderer class
Top
Properties
  NameDescription
Public propertyRequiredRendermodes
Specifies which stages of rendering this renderer should be called.
Top
Methods
  NameDescription
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 methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodRender
Called when this item should render itself on the map.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Fields
  NameDescription
Public fieldshowLabels
Set to true to display labels.
Public fieldStyle
The map style created from the partial CAM file.
Top
Remarks

If the partial cam file is written to render custom data, that data must be in the same repository as the rest of the map data.

Anything in the map style that the cam file defines is drawn on top of the map. Thus, if the partial cam file includes instructions for rendering features that are already rendered by the default map style (or another partial cam renderer), those features will be drawn twice.

Examples
In this example, a partial cam renderer is used to draw custom map data on top of a map that uses the default map style for rendering the other map features.
C#
public MyForm() {
    InitializeComponent();

    // Use a multirepository to ensure that we use the same repository for
    // custom data that we use for the map data.
    SimpleRepository usa = new SimpleRepository(@"..\Data\USA.gbfs");
    SimpleRepository customData = new SimpleRepository(@"..\Data\MyCustomData.gbfs");
    MultiRepository mr = new MultiRepository();
    mr.AddRepository(usa);
    mr.AddRepository(customData);

    // set our current thread to use our MultiRepository
    Repository.CurrentThreadRepository = mr;

    // Create a PartialCamRenderer to draw the custom data on top of the map data
    // (The map data is rendered using the default map style.)
    PartialCamRenderer pcr = new PartialCamRenderer();
    // MyCustomData.cam is a partial cam file with commands for rendering the custom data
    pcr.Style = MapStyle.Create(@"..\Data\MyCustomData.cam");
    pcr.RequiredRendermodes = RenderMode.PostLabelling;

    mapCtrl1.Renderer = pcr;
}
See Also