ESRI.ArcGIS.ADF.IMS
RasterMarkerSymbol Class
Members  Example  See Also  Send Feedback
ESRI.ArcGIS.ADF.IMS.Display.Symbol Namespace : RasterMarkerSymbol Class




MarkerSymbol that symbolizes point features using a given raster image.

Object Model

RasterMarkerSymbol Class

Syntax

Visual Basic (Declaration) 
<SerializableAttribute()>
Public Class RasterMarkerSymbol 
   Inherits MarkerSymbol
Visual Basic (Usage)Copy Code
Dim instance As RasterMarkerSymbol
C# 
[SerializableAttribute()]
public class RasterMarkerSymbol : MarkerSymbol 

Example

The following example replaces an existing point layer's symbol with a newly created RasterMarkerSymbol.
Visual BasicCopy Code
' Create a new raster marker symbol and set its properties
Dim rasterMarkerSymb As New RasterMarkerSymbol()
rasterMarkerSymb.Image = "C:\Temp\citysymbol.gif"
' Url property isn't used by image services--only needed if using Web ADF TOC control
rasterMarkerSymb.Url = "http://myserver/temp/citysymbol.gif"
rasterMarkerSymb.AllowLabelOverlap = False
rasterMarkerSymb.Antialiasing = True
rasterMarkerSymb.Height = 16
rasterMarkerSymb.Width = 16
rasterMarkerSymb.Hotspot = New System.Drawing.Point(2, 2)
rasterMarkerSymb.ShadowColor = Drawing.Color.DarkBlue
rasterMarkerSymb.Transparency = 30
 
' Retrieve an existing point layer's renderer
Dim layer As FeatureLayer = mapView.Layers.FindByName("Cities")
Dim grpRend As GroupRenderer = layer.Renderer
 
' Create a new simple renderer to contain the symbol, and replace the existing feature renderer
Dim simpleRend As New SimpleRenderer(rasterMarkerSymb)
grpRend.Renderers.RemoveAt(0)
grpRend.Renderers.Add(simpleRend)
C#Copy Code
//Create a new raster marker symbol and set its properties
RasterMarkerSymbol rasterMarkerSymb As New RasterMarkerSymbol();
rasterMarkerSymb.Image = "C:\Temp\citysymbol.gif";
// Url property isn't used by image services--only needed if using Web ADF TOC control
rasterMarkerSymb.Url = "http://myserver/temp/citysymbol.gif";
rasterMarkerSymb.AllowLabelOverlap = False;
rasterMarkerSymb.Antialiasing = True;
rasterMarkerSymb.Height = 16;
rasterMarkerSymb.Width = 16;
rasterMarkerSymb.Hotspot = New System.Drawing.Point(2, 2);
rasterMarkerSymb.ShadowColor = Drawing.Color.DarkBlue;
rasterMarkerSymb.Transparency = 30;
 
// Retrieve an existing point layer's renderer
FeatureLayer layer = mapView.Layers.FindByName("Cities");
GroupRenderer grpRend = layer.Renderer;
 
// Create a new simple renderer to contain the symbol, and replace the existing feature renderer
SimpleRenderer simpleRend = new SimpleRenderer(rasterMarkerSymb);
grpRend.Renderers.RemoveAt(0);
grpRend.Renderers.Add(simpleRend);

Remarks

This symbol allows drawing of raster images as symbols on the map. Images should be kept relatively small. The image is drawn on the map by the server, so that the raster image does not need to be available to the client (browser).

Typically this class used to symbolize point features, but may also be used to symbolize line or polygon features.

May be used either to symbolize a FeatureLayer within its renderer, or to symbolize a GeometryElement in an acetate layer.

For ArcMap Server image services, valid only for acetate layers. ArcMap Server ignores several of the properties of this class. For details, see the topic for RASTERMARKERSYMBOL in the ArcIMS Help, at ArcXML Guide - Symbol elements - RASTERMARKERSYMBOL. The ArcIMS Help is also available online at ESRI).

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

© 2011 All Rights Reserved.