PartialCamRenderer Class |
Namespace: Telogis.GeoBase
The PartialCamRenderer type exposes the following members.
Name | Description | |
---|---|---|
PartialCamRenderer | Initializes a new instance of the PartialCamRenderer class |
Name | Description | |
---|---|---|
RequiredRendermodes |
Specifies which stages of rendering this renderer should be called.
|
Name | Description | |
---|---|---|
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.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
Render |
Called when this item should render itself on the map.
| |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
showLabels |
Set to true to display labels.
| |
Style |
The map style created from the partial CAM file.
|
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.
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; }