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;
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;