Hi guys at mapstraction,
I made a change in the Polyline.toMicrosoft() function, in order to have
all the power that a VEShape has, for instance fill color. Below is the new
code, if you want to use it, change it, or whatever.
Cheers,
Beta
/**
* toMicrosoft returns a Microsoft polyline
* @returns a VEShape
*/
Polyline.prototype.toMicrosoft = function() {
var mpolyline;
var mpoints = [];
for (var i = 0, length = this.points.length ; i< length; i++){
mpoints.push(this.points[i].toMicrosoft());
}
var color;
var opacity = this.opacity ||1.0;
if(this.color){
color = new
VEColor(parseInt(this.color.substr(1,2),16),parseInt(this.color.substr(3,2),16),parseInt(this.color.substr(5,2),16),
opacity);
}else{
color = new VEColor(0,255,0, opacity);
}
mpolyline = new VEShape(VEShapeType.Polygon, mpoints);
mpolyline.SetLineColor(color);
mpolyline.SetLineWidth(this.width || 1);
mpolyline.HideIcon();
if(this.fillColor){
var fillColor = new
VEColor(parseInt(this.fillColor.substr(1,2),16),parseInt(this.fillColor.substr(3,2),16),parseInt(this.fillColor.substr(5,2),16),
opacity);
mpolyline.SetFillColor(fillColor);
}
return mpolyline;
};
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.mapstraction.com/pipermail/mapstraction-mapstraction.com/attachments/20090202/f2ba47c3/attachment.htm>