裡面有參雜我製作座標的寫法
但基本上寫法差不多
function WriteLonLatData()
{
var layerPoint=getMap().getMapLayer(”aaddress”).getMapObjects()
alert(layerPoint.size());
document.all.sssss.value=”";
var XML=new XMLWriter();
XML.BeginNode(”Data”);
for (var i = 0; i /g, “>”);
return “”
}
this.BeginNode = function(Name)
{
if (!Name) return;
if (this.State==”beg”) this.XML.push(”>”);
this.State=”beg”;
this.Nodes.push(Name);
this.XML.push(”");
this.Nodes.pop();
}
else if (this.Nodes.length>0)
this.XML.push(”");
this.State=”";
}
this.Attrib = function(Name, Value)
{
if (this.State!=”beg” || !Name) return;
this.XML.push(” “+Name+”=\”"+this.FormatXML(Value)+”\”");
}
this.WriteString = function(Value)
{
if (this.State==”beg”) this.XML.push(”>”);
this.XML.push(this.FormatXML(Value));
this.State=”";
}
this.Node = function(Name, Value)
{
if (!Name) return;
if (this.State==”beg”) this.XML.push(”>”);
this.XML.push((Value==”" || !Value)?”":”"+this.FormatXML(Value)+”");
this.State=”";
}
this.Close = function()
{
while (this.Nodes.length>0)
this.EndNode();
this.State=”closed”;
}
this.ToString = function(){return this.XML.join(”");}
}
留言列表