下面是程序中的一个主要的部分,
application.createform(Tdisplay_map,display_map);
zmap:=display_map.maptool.ControlInterface;
for i:=zmap.layers.countdo
wnto 1do
zmap.Layers.reMove(i);
display_map.maptool.NumericCoordSys:=zmap.displaycoordsys;
for zi:=0 to tmplist.Count-1do
if alltrim(tmplist.strings[zi])<>'' then
begin
zmap.layers.Add(tmplist.strings[zi],zi+1);
lay:=zmap.layers.item(zi+1);
display_map.maptool.OleObject.datasets.add(6,lay,lay);
end;
//zdataset:=zmap.datasets.item(1);
if 2=2 then
for i:=1 to zmap.layers.countdo
for j:=zmap.layers.item(i).allfeatures.countdo
wnto 1do
begin
zfeature:=zmap.layers.item(i).allfeatures.item(j);
do
ne1:=false;
zi:=-1;
k:=1;
while k<=zmap.datasets.countdo
begin
if zmap.datasets.item(k).layer.name=zmap.layers.item(i).name then
begin
zi:=k;break;
end;
inc(k);
end;
do
ne:=true;
if zi>0 then
begin
zdataset:=zmap.datasets.item(zi);
do
ne1:=false;
for k:=1 to zdataset.fields.countdo
if zdataset.fields.item(k).name='代码' then
begin
do
ne1:=true;break;
end;
do
ne2:=false;
for k:=1 to zdataset.fields.countdo
if zdataset.fields.item(k).name='丘号' then
begin
do
ne2:=true;break;
end;
do
ne3:=false;
for k:=1 to zdataset.fields.countdo
if zdataset.fields.item(k).name='幢号' then
begin
do
ne3:=true;break;
end;
do
ne:=true;
code:='';location:='';land_no:='';room_no:='';build_no:='';
if (done1 anddo
ne2 anddo
ne3) then
begin
//tmpv:=display_map.maptool.oleobject.layers.item(1).allfeatures.item(j);
//tmpv1:='代码';
tmpv:=zdataset.value[zfeature,'代码'];
if (vartype(tmpv)=varString) or (vartype(tmpv)=varOleStr) then
code:=tmpv;
tmpv:=zdataset.value[zfeature,'丘号'];
if (vartype(tmpv)=varString) or (vartype(tmpv)=varOleStr) then
land_no:=tmpv;
tmpv:=zdataset.value[zfeature,'幢号'];
if (vartype(tmpv)=varString) or (vartype(tmpv)=varOleStr) then
build_no:=tmpv;
code:=alltrim(code);
location:=alltrim(location);
land_no:=alltrim(land_no);
build_no:=alltrim(build_no);
if room_map_in.land_no<>'' then
if (code=speccode[1]) and (land_no=room_map_in.land_no) and
(build_no=room_map_in.build_no) then
do
ne:=false;
end;
end;
//end of if zi
case zfeature.type_ of
miFeatureTypeRegion:
begin
zfeature.style.RegionBorderColor:=micolorblack
zfeature.style.RegionBorderWidth:=iif(done,1,3);
end;
miFeatureTypeLine:
begin
zfeature.style.LineColor:=micolorblack;
zfeature.style.linewidth:=iif(done,1,3);
end;
miFeatureTypeSymbol: zstyle.SymbolFontColor:=micolorblack;
miFeatureTypeMixed:
begin
zfeature.style.RegionBorderColor:=micolorblack;
zfeature.style.RegionBorderWidth:=iif(done,1,3);
end;
//miFeatureTypeUnknown:;
miFeatureTypeText:
begin
// zfeature.style.TextFontColor:=micolorblack;
//tmpv:=display_map.maptool.oleobject.layers.item(i).allfeatures.item(j).style.textFontRotation;
end;
end;
//if zfeature.type_<>miFeatureTypeText then
begin
//zfeature.style:=zstyle.Clone;
//zmap.Layers.item(1).Updatefeature(zfeature,zfeature);
zfeature.Update;
end;
***************************************************************
end;
但显示的图象只有一点点大!
曾经想在**********************
处用zoom 值定位图象的大小,总是失败