查询地名显示查询道的坐标如何写(我就剩下这些分了)(10分)

  • 主题发起人 主题发起人 okgxsh
  • 开始时间 开始时间
O

okgxsh

Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm1.SpeedButtonMapChangeViewClick(Sender: TObject);

var
custInState, custInDistance, customersFound: CMapXFeatures;
stateFeature: CMapXFindFeature;
custLayer: CMapXLayer;
FindCityObject :FindFeature;
begin

{ 给定的图层名为 Customers Layer,查找(state)内的所有
客户,位于距离 (pt) 的 (distance) (units) 之内 }
custLayer := Mapx.Layers.Item('usa');
{ 查找该州 }
stateFeature := Mapx.Layers.Item('US Top 20 Cities').Find.Search('dallas', EmptyParam);
//Mapx.Layers.Item('United States').Find.Search('dallas', EmptyParam);

if stateFeature.FindRC mod 10 <> 1 then

{ 没有找到完全匹配项 }
Application.MessageBox('Couldn''t find state','Nope',0)
else

begin

mapx.ZoomTo(200,FindCityObject.CenterX,FindCityObject.CenterY);//z这段代码有问题 谁能帮帮我!!
end;

end;
 
mapx.ZoomTo(200,FindCityObject.CenterX,FindCityObject.CenterY);改为:
mapx.ZoomTo(200,stateFeature.CenterX,stateFeature.CenterY);即可。
 
再次感谢!!
ok
 
多人接受答案了。
 
后退
顶部