一个简单填充的示例(有透明效果):

1
2
3
4
5
6
7
8
var  symbol =  new  SimpleFillSymbol(
             SimpleFillSymbol.STYLE_SOLID,
             new  SimpleLineSymbol(
               SimpleLineSymbol.STYLE_SOLID,
               new  Color([255,0,0,0.65]), 2
             ),
             new  Color([255,0,0,0.35])
           );


图片填充:


1
2
3
4
5
6
7
8
9
10
11
12
// fill symbol used for extent, polygon and freehand polygon, use a picture fill symbol
// the images folder contains additional fill images, other options: sand.png, swamp.png or stiple.png
var  fillSymbol =  new  PictureFillSymbol(
   "images/mangrove.png" ,
   new  SimpleLineSymbol(
     SimpleLineSymbol.STYLE_SOLID,
     new  Color( '#000' ),
     1
   ),
   42,
   42
);

点状样式:


1
2
3
4
// markerSymbol is used for point and multipoint, see http://raphaeljs.com/icons/#talkq for more examples
var  markerSymbol =  new  SimpleMarkerSymbol();
markerSymbol.setPath( "M16,4.938c-7.732,0-14,4.701-14,10.5c0,1.981,0.741,3.833,2.016,5.414L2,25.272l5.613-1.44c2.339,1.316,5.237,2.106,8.387,2.106c7.732,0,14-4.701,14-10.5S23.732,4.938,16,4.938zM16.868,21.375h-1.969v-1.889h1.969V21.375zM16.772,18.094h-1.777l-0.176-8.083h2.113L16.772,18.094z" );
markerSymbol.setColor( new  Color( "#00FFFF" ));