yaohongbo_play
路人甲
路人甲
  • 注册日期2003-10-16
  • 发帖数39
  • QQ85043308
  • 铜币182枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1412回复:1

用这段代码放大地图怎么不好使呢?

楼主#
更多 发布于:2003-11-20 10:30
用这段代码放大地图怎么不好使呢?
var
  lyrs:IMoLayers;
  lyr:variant;
  ZoomOutRect,ARect:IMoRectangle;
begin
  if CheckListBox_Layer.ItemIndex=-1 then
  begin
    ShowMessage('请选择图层!');
    Exit;
  end;
  
  lyrs:=map1.Layers;
  lyr:=lyrs.item(CheckListBox_Layer.ItemIndex);
  if lyr.layertype=moMapLayer then
  begin
    if not lyr.visible then
    begin
      ShowMessage('请先显示该图层!');
      Exit;
    end;
    ARect:=IMoRectangle(m_extentrect.Items[CheckListBox_Layer.ItemIndex]);
    if (ARect.Width=0)and(ARect.Height=0) then
      exit;
    ZoomOutRect:=Map1.Extent;
    ZoomOutRect.Left:=ARect.Left;
    ZoomOutRect.Top:=ARect.Top;
    ZoomOutRect.Bottom:=ARect.Bottom;
    ZoomOutRect.Right:=ARect.Right;
    Map1.FlashShape(ZoomOutRect,2);
    Map1.Extent:=ZoomOutRect;
    Map1.Refresh;
  end;
end;
喜欢0 评分0
游客

返回顶部