大概例子吧,没有现成的,你还不明白的话可以mailtome.
var mylayer:CMapXLayer;
myfeature:CMapXFeature;
mypoints:CMapXPoints;
mypoint:CMapXPoint;
begin
mylayer:=map1.layers.createlayer('layername',emptyparam,0,emptyparam,emptyparam);
mypoint:=copoint.create;
mypoints:=copoints.create;
myfeature:=cofeature.create;
mypoint.x;=123.45;
mypoint.y:=54.321;
mypoints.add(mypoint);//具体参数忘了怎么写,你可以看mapx4 help里有
myfeature.parts.add(mypoints);//具体参数忘了怎么写,你可以看mapx4 help里有
mylayer.addfeature(myfeature);//具体参数忘了怎么写,你可以看mapx4 help里有
mylayer.update;
如果要另画一条线的话记得mypoints.removeall and myfeature.parts.removeall