Symbol is an interface for symbolic style settings on Graphic objects, and all symbol style classes implement the symbol interface.
1.PictureMarkerSymbol
Picturemarkersymbol is a class that styles settings for Graphic objects of points or multipoint features, Picturemarkersymbol
Pictures, such as the URL or drawable to set the picture symbol, for Picturemarkersymbol can also set the picture symbol rotation angle and
Position offset, as follows:
Create picture styles to match
Picturemarkersymbol pic = new Picturemarkersymbol (Getresources (). getdrawable (R.drawable.icon));
Points pt = new Point (113,32);//Create a Dot Object
Graphic GP = new Graphic (pt,pic); set style
Graphicslayer.addgraphic (GP); Add to Layer
2.SimpleMarkerSymbol
Simplemarkersymbol is also a class for styling the Graphic objects of point features, Simplemarkersymbol and
The Picturemarkersymbol class is similar, except that one renders as a vector point and the other replaces that point with a picture. Using Simplemarkersymbol
You can set the style of a point, such as the size, color, and type of a point, using the following:
Point points = new dot ();//Create a Spot object
POINT.SETX (114);//set X coordinate
Point.sety (32);//Set y-coordinate
Set the color, size, and point type of a point style
Simplemarkersymbol SMS = new Simplemarkersymbol (Color.red,25,style. CIRCLE)
Graphic GP = new Graphic (point,sms);
Graphicslayer.addgraphic (GP);//Add to layer display
3. Simplelinesymbol
Simplelinesymbol is a class for styling the Graphic object of a linear feature, through which you can set the style of a linear feature, package
including Linetype, line color, line width, and line transparency, etc., as follows:
Polyline Poly = new Polyline ();//Create Poly Object
Poly.startpath (new Point (0,0));//Add initial points
Poly.lineto (new Point (10,0));
Poly.lineto (new Point (10,10));
Simplelinesymbol SLS = new Simplelinesymbol (color.red,25, simplelinesymbol.solid);//Line Style object,
Includes parameters such as color, line width, and linetype
Sfs.setalpha (50);//Set Transparency
Graphic GP = new Graphic (poly, SLS);
Graphicslayer.addgraphic (GP);//Add to Layer
4.SimpleFillSymbol
Simplefillsymbol is a class that styles the Graphic object of a polygon feature by setting the fill color of the polygon features and
Brightness, you can also add a border to the polygon features style settings, Simplefillsymbol usage is very simple, as follows:
Polygon Poly = new Polygon ();//Create Poly Object
Poly.startpath (new Point (0,0));//Add initial points
Poly.lineto (new Point (10,0));
Poly.lineto (new Point (10,10));
Poly.lineto (new Point (0,0));//The polygon is closed, so the last place to add the initial points
Simplefillsymbol SFS = new Simplefillsymbol (color.red);//Polygon Style object
Sfs.setalpha (50);//Set Transparency
Graphic GP = new Graphic (POLY,SFS);
Graphicslayer.addgraphic (GP);//Add to Layer
5.TextSymbol
Textsymbol is also a class for styling the Graphic object of a point feature, which replaces the position of the point with text for plotting the display.
With Textsymbol, you can set the size, color, content, and arrangement of text. There are two ways of plotting text: horizontal and vertical
column, which is displayed by default in landscape orientation. Use the following:
Point points = new dot ();//Create a Spot object
POINT.SETX (114);//set X coordinate
Point.sety (32);//Set y-coordinate
Set the color, size, and text content of a point style
Textsymbol ts = new Textsymbol (12, "point style", color.red);
Graphic GP = new Graphic (point,ts);
Graphicslayer.addgraphic (GP);//Add to layer display
The--symbol of symbolic rendering is summarized here, if there is perfect to follow.
Symbol Rendering Chapter--symbol