new Style(fill, stroke, image, text)
样式对象
Parameters:
Name | Type | Description |
---|---|---|
fill |
szgeoinfo.style.Fill | 填充对象 |
stroke |
szgeoinfo.style.Stroke | 边框对象 |
image |
szgeoinfo.style.Image | 图标对象 |
text |
szgeoinfo.style.Text | 文字对象 |
Example
var fill=new szgeoinfo.style.Fill("rgba(253,206,4,1)");//填充颜色 var stroke=new szgeoinfo.style.Stroke("rgba(253,206,4,1)",1);//边框颜色宽度 var text=new szgeoinfo.style.Text('bold 24px 宋体',0,0,'',new szgeoinfo.style.Fill("rgba(255,255,255,1)"),'',setFeatureText);//显示绘制后的坐标 var image=new szgeoinfo.style.Image("images/bluepoint.png",[500,500],0.2); var style=new szgeoinfo.style.Style(fill,stroke,image,text);
Methods
-
setFill(fill)
-
设置填充
Parameters:
Name Type Description fill
szgeoinfo.style.Fill 填充对象
-
setImage(image)
-
设置图标对象
Parameters:
Name Type Description stroke
szgeoinfo.style.Image 图标对象
-
setStroke(stroke)
-
设置边框
Parameters:
Name Type Description stroke
szgeoinfo.style.Stroke 边框对象
-
setText(text)
-
设置标注对象
Parameters:
Name Type Description text
szgeoinfo.style.Text 标注对象