szgeoinfo.Marker

Class: szgeoinfo.Marker


new Marker(point, style)

标注对象

Parameters:
Name Type Description
point szgeoinfo.Point

点对象

style szgeoinfo.style.Style

显示样式

Example
var one = new szgeoinfo.Point(114.0907591,22.54550907);
var stroke=new szgeoinfo.style.Stroke("rgba(253,206,4,1)",1);//边框颜色宽度
var size=[200,200];//图片尺寸
var image=new szgeoinfo.style.Image("images/box.png",size,1);
var style=new szgeoinfo.style.Style('',stroke,image,'');
var marker=new szgeoinfo.Marker(one,style);
map.addMarker(marker);

marker.hide();//隐藏

Methods


hide()

标注对象隐藏


setStyle(style)

修改Marker的Style

Parameters:
Name Type Description
style szgeoinfo.style.Style

显示样式

Example
var image1=new szgeoinfo.style.CircleStyle(7,fill,stroke);
var style1=new szgeoinfo.style.Style('','',image1,'');
marker.setStyle(style1);

show()

标注对象显示