📄 activetrace.js
字号:
// JScript 文件
/*绘制流动人口轨迹图
*
*/
activeTrace = Class.create();
activeTrace.prototype = Object.extend(new Abstract.ShapeMarker(),
{
initialize: function(ato)
{
this.init(ato);
this.ato.shapeType="6";
},
buildVML:function()
{
var vml_code='<v:polyline id="vml_'+this.id+'" points="'+this.getShapePathValue()+'" filled="false" style="POSITION:absolute;left:-3px;top:-3px;" ></v:polyline>'
var opaci=document.createElement('<v:stroke startarrow="oval" endarrow="open" endarrowlength="long" endarrowwidth="wide" color="'+this.ato.lineColor+'" weight="'+this.ato.lineWidth+'pt" opacity="50%"/>');
var vml_obj=document.createElement(vml_code);
vml_obj.appendChild(opaci);
points_path=null;
return vml_obj;
},
getShapePathValue:function()
{
var points_path="";
var point_list=this.ato.shapePath.to_pixel(this.model.getZoom());
for (var i=0;i<point_list.length ;i++ )
{
// var item=point_list[i].x+"px,"+point_list[i].y+"px ";
var item=point_list[i].x+","+point_list[i].y+" ";
points_path+=item;
}
return points_path;
},
setBalancePoint:function()
{
var piece_num=Math.floor((this.ato.shapePath.keyPoints.length-1)/2);
var point_list=this.ato.shapePath.to_pixel(this.model.getZoom());
var balance=new PointEntry();
balance.x=(point_list[piece_num].x+point_list[piece_num+1].x)/2;
balance.y=(point_list[piece_num].y+point_list[piece_num+1].y)/2;
this.balancePoint=balance;
},
updateVML:function()
{
this.vmlObj.points.value=this.getShapePathValue();
this.vmlObj.strokecolor=this.ato.lineColor;
this.vmlObj.strokeweight=this.ato.lineWidth+"pt";
this.set_markInfo(false);
// this.tip.setPixel(this.decide_tip_pos());
this.decide_tip_pos();
}
});
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -