愛招飛幫助手冊 愛招飛幫助手冊
  • FastERP-1
  • Smart
  • PinToo
  • FastWeb
  • FastERP-2 企業管理系統 (opens new window)
  • 印染業ERP (opens new window)
  • 工廠終端機 (opens new window)
  • TARS
  • MARS
  • TaskRunner
  • Flying
  • FastDesk
  • HiDesk
  • HiNAT
  • FastBPM
  • 設備故障診斷 (opens new window)
  • 設備最佳運轉效益 (opens new window)
  • 企業智能助手SmeGPT (opens new window)
  • 燈號管理 (opens new window)
  • 戰情室 (opens new window)
  • 能源管理 (opens new window)
  • 人車定位 (opens new window)
  • 戰情指揮系統 (opens new window)
  • FastERP-1
  • FastWeb
  • Smart
  • PinToo
  • Flying
  • TARS
  • 通用功能

    • Report
    • Script
    • Echarts
    • Chart
    • DB Install
  • FastERP-1
  • Smart
  • PinToo
  • FastWeb
  • FastERP-2 企業管理系統 (opens new window)
  • 印染業ERP (opens new window)
  • 工廠終端機 (opens new window)
  • TARS
  • MARS
  • TaskRunner
  • Flying
  • FastDesk
  • HiDesk
  • HiNAT
  • FastBPM
  • 設備故障診斷 (opens new window)
  • 設備最佳運轉效益 (opens new window)
  • 企業智能助手SmeGPT (opens new window)
  • 燈號管理 (opens new window)
  • 戰情室 (opens new window)
  • 能源管理 (opens new window)
  • 人車定位 (opens new window)
  • 戰情指揮系統 (opens new window)
  • FastERP-1
  • FastWeb
  • Smart
  • PinToo
  • Flying
  • TARS
  • 通用功能

    • Report
    • Script
    • Echarts
    • Chart
    • DB Install
  • Smart幫助主頁
  • 學習手冊

    • 基本入門

    • 功能介紹

    • 控制元件說明

      • 公共屬性
      • 公共方法
      • 公共事件
      • 視窗控制元件
      • 系統控制元件
      • 標準控制元件
      • 對話方塊控制元件
      • 標準工控控制元件
      • 專業工控控制元件
      • 數據控制控制元件
      • 數據表格控制元件
      • 數據感知控制元件
      • 通訊控制控制元件
      • 儀表採集控制元件
      • 監控視訊控制元件
      • 數據圖表控制元件
      • 流程圖表控制元件
      • 數據分析控制元件
      • 複合數控控制元件
      • 模擬數控控制元件
      • 調節數控控制元件
      • 數位數控控制元件
      • 數據數控控制元件
      • 地圖控制元件
        • 1. TFNCMaps
          • 1.1. 屬性
          • 1.1.1. APIKey
          • 1.1.2. Circles
          • 1.1.3. ElementContainer
          • 1.1.4. Markers
          • 1.1.5. Polygons
          • 1.1.6. Polylines
          • 1.1.7. Rectangles
          • 1.1.8. Service
          • 1.2. 方法
          • 1.2.1. BeginUpdate
          • 1.2.2. EndUpdate
          • 1.2.3. AddMarkerRec
          • 1.2.4. AddMarkerCoordinate
          • 1.2.5. ClearMarkers
          • 1.2.6. ClearPolyLines
          • 1.2.7. ClearPolygons
          • 1.2.8. ClearRectangles
          • 1.2.9. ShowPopup
          • 1.2.10. SetZoomLevel
        • 2. TFNCOpenLayers
          • 2.1. TileServer
          • 2.1.1. TileLayers
          • 2.1.2. 折線與多邊形標籤
        • 3. TFNCGeocoding
          • 3.1. 屬性
          • 3.1.1. APIKey
          • 3.1.2. GeocodingRequests
          • 3.1.3. Service
          • 3.2. 事件
          • 3.3. 方法
          • 3.3.1. GetGeocodingAddress
      • 其他控制元件
      • SVG控制元件
      • IsoBean控制元件
      • 樣式控制元件
      • 樣式外觀控制元件
      • 樣式高級控制元件
      • 樣式工具控制元件
      • 樣式數據控制元件
      • 樣式控制元件GP
      • 樣式數據控制元件GP
    • 功能用法

    • 專用模板

    • 開發流程

    • 函式程式

  • 開發手冊

目录

地圖控制元件

# Smart 控制元件使用(地圖)

  此組主要顯示地圖顯示與定位相關的控制元件。

# 1. TFNCMaps

   此控制元件是地圖服務的抽像層展示,可通過地圖資訊服務商提供的API來實現特定的地圖顯示的功能。

  關於自定義的圖形的新增方法。

  • 新增折線的示例。
var
  pl: TTMSFNCMapsPolyline;
  har,bat: TTMSFNCMapsCoordinateRec;
begin
  FThis.FNCMaps1.ClearPolylines;

  har.Longitude := 49.0564068515288;
  har.Latitude := 24.1373163639494;

  bat.Longitude := 51.4464373615322;
  bat.Latitude := 24.1401611354134;

  pl := FThis.FNCMaps1.AddPolyline([har, bat],false);
  pl.DataInteger := 6;
  pl.StrokeColor := clGreen;
  pl.StrokeWidth := 3;

  FThis.FNCMaps1.AddMarkerCoordinate((har.Latitude + bat.Latitude)/2, (har.Longitude + bat.Longitude)/2,'','').DataInteger := 3;
  FThis.FNCMaps1.ZoomToBoundsArray1([har,bat]);
end;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  • 新增多邊形的示例。
var
  pg: TTMSFNCMapsPolygon;
  p1, p2, p3, p4: TTMSFNCMapsCoordinateRec;
begin
  FThis.FNCMaps1.ClearPolygons;

  p1.Latitude := 40.768082023319;
  p1.Longitude := -73.9818960428238;

  p2.Latitude := 40.8005952613788;
  p2.Longitude := -73.958161778013;

  p3.Latitude := 40.7968781747203;
  p3.Longitude := -73.9492411198608;

  p4.Latitude := 40.7643144104723;
  p4.Longitude := -73.9730009241094;

  pg := FThis.FNCMaps1.AddPolygon([p1, p2, p3, p4], True);
  pg.DataInteger := 5;
  pg.StrokeColor := clBlue;
  pg.StrokeWidth := 2;
  pg.FillColor := clBlue;
  pg.FillOpacity := 0.1;

  FThis.FNCMaps1.AddMarkerCoordinate(40.7811313, -73.9687576,'','').DataInteger := 4;
  FThis.FNCMaps1.ZoomToBoundsArray1([p1, p2, p3, p4]);
end;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
  • 新增矩形的示例。
var
  b: TTMSFNCMapsBoundsRec;
  r: TTMSFNCMapsRectangle;
begin
  FThis.FNCMaps1.ClearRectangles;

  b.NorthEast.Latitude := 32.217;
  b.NorthEast.Longitude := 110.183;
  b.SouthWest.Latitude := 28.167;
  b.SouthWest.Longitude := 105.283;

  r := FThis.FNCMaps1.Rectangles.Add;
  r.Bounds.NorthEast.Latitude := b.NorthEast.Latitude;
  r.Bounds.NorthEast.Longitude := b.NorthEast.Longitude;
  r.Bounds.SouthWest.Latitude := b.SouthWest.Latitude;
  r.Bounds.SouthWest.Longitude := b.SouthWest.Longitude;
  r.DataInteger := 1;
  r.StrokeWidth := 3;
  r.StrokeColor := $00848484;
  r.FillColor := clGreen;
  r.FillOpacity := 0.1;

  FThis.FNCMaps1.AddMarkerCoordinate(29.4584295, 106.8656296,'','').DataInteger := 1;
  FThis.FNCMaps1.ZoomToBoundsRec(b);
end;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
  • 新增圓示例:
var
  c: TTMSFNCMapsCircle;
  tamboraC: TTMSFNCMapsCoordinateRec;
begin
  FThis.FNCMaps1.ClearCircles;

  tamboraC.Latitude := -8.24791127099354;
  tamboraC.Longitude := 117.991082668304;

  c := FThis.FNCMaps1.Circles.Add;
  c.Radius := 1300000;
  c.DataInteger := 4;
  c.StrokeColor := clYellow;
  c.FillColor := clYellow;
  c.FillOpacity := 0.2;

  c := FThis.FNCMaps1.Circles.Add;
  c.Radius := 500000;
  c.DataInteger := 3;
  c.StrokeColor := clRed;
  c.FillColor := clRed;
  c.FillOpacity := 0.3;

  c := FThis.FNCMaps1.Circles.Add;
  c.Radius := 75000;
  c.DataInteger := 2;
  c.StrokeColor := clRed;
  c.FillColor := clRed;
  c.FillOpacity := 0.4;

  FThis.FNCMaps1.AddMarkerRec(tamboraC,'','').DataInteger := 2;
  FThis.FNCMaps1.SetCenterCoordinate(tamboraC);

  FThis.FNCMaps1.ZoomToBounds(CreateCircle(tamboraC, 140000));
end;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

# 1.1. 屬性

# 1.1.1. APIKey

property APIKey: UnicodeString;
1

  用於設定APIKey,對於部分地圖資訊提供商,需要填寫此屬性后才可使用。

# 1.1.2. Circles

property Circles: TTMSFNCMapsCircles;
1

  圓標記的管理。點選屬性右側 [...] 按鈕可手動新增標記。新增的標記包含以下屬性:

名稱 說明
Center 設定圓的中心位置,指定標記的緯度與經度位置
FillColor 圓所使用的填充層的顏色
FillOpacity 填充層的透明度
Radius 圓的半徑
StrokeColor 圓邊線的顏色
StrokeOpacity 圓邊線的透明度
StrokeWidth 圓邊線的畫素寬度
Visible 是否顯示

# 1.1.3. ElementContainer

property ElementContainer: TTMSFNCElementContainer;
1

  通過此屬性的設定,可在地圖上層新增HTML與CSS元素。通過Actions 可建立自定義控制元件,這部分內容與地圖服務相互獨立,在任何地圖服務下均顯示為相同的效果。點選屬性右側的 [...] 按鈕可手動新增。新增的元素包含以下屬性:

名稱 說明
Actions 設定執行的動作
HTML 元素的HTML
HTMLElementClass 元素的類名稱
HTMLElementID 元素的ID

# 1.1.4. Markers

property Markers: TTMSFNCMapsMarkers;
1

  地圖示記的管理。點選按鈕可手動新增標記。新增的標記包含以下屬性:

名稱 說明
IconURL 如使用自定義圖示,則在此處指定自定義圖示的URL
Latitude 指定標記所在的緯度
Longtitude 指定標記所在的經度
Title 標記的標題資訊
Visible 標記是否可見

# 1.1.5. Polygons

property Polygons: TTMSFNCPolygons;
1

  多邊形標記的管理,點選屬性右側的 [...] 可手動新增標記。新增的標記包含以下屬性:

名稱 說明
Coordinates 多邊形的角所在的經緯度位置
FillColor 填充層的顏色
FillOpacity 填充層的透明度
StrokeColor 邊線的顏色
StrokeOpacity 邊線的透明度
StrokeWidth 邊線的畫素寬度
Visible 是否顯示

# 1.1.6. Polylines

property Polylines: TTMSFNCPolylines;
1

  折線標記的管理,點選點選屬性右側的 [...] 可手動新增標記。新增的標記包含以下屬性:

名稱 說明
Coordinates 折線的端點所在的經緯度位置
StrokeColor 邊線的顏色
StrokeOpacity 邊線的透明度
StrokeWidth 邊線的畫素寬度
Visible 是否顯示

# 1.1.7. Rectangles

property Rectangles: TTMSFNCRectangles;
1

  矩形標記的管理,點選點選屬性右側的 [...] 可手動新增標記。新增的標記包含以下屬性:

名稱 說明
Bounds 設定定位邊線的座標位置,需為 NorthEast 與 SouthWest 設定經緯度位置。
FillColor 填充層的顏色
FillOpacity 填充層的透明度
StrokeColor 邊線的顏色
StrokeOpacity 邊線的透明度
StrokeWidth 邊線的畫素寬度
Visible 是否顯示

# 1.1.8. Service

property Service: TTMSFNCMapsService;
1

  設定地圖服務的提供商。您可以在程式中動態切換地圖服務提供商,動態切換后,已設定的標記、折線、多邊形等仍然會保留。但是定位資訊與縮放等會恢復至預設設定。可選專案如下:

名稱 說明
msAzureMaps Azure 地圖
msBingMaps Bing 地圖
msGoogleMaps Google 地圖
msHere Here 地圖
msMapBox MapBox 地圖
msMapKit MapKit 地圖
msOpenLayers OpenLayers 地圖
msTomTom TomTom 地圖

# 1.2. 方法

# 1.2.1. BeginUpdate

procedure BeginUpdate;
1

  開始執行更新。

# 1.2.2. EndUpdate

procedure EndUpdate;
1

  結束更新。

# 1.2.3. AddMarkerRec

function AddMarkerRec(var ACoordinate: TTMSFNCMapsCoordinateRec;ATitle: UnicodeString;AIconURL:UnicodeString): TTMSFNCOpenLayersMarker;
1

  在地圖的指定位置新增標記。

var
  Coordinate: TTMSFNCMapsCoordinateRec;
begin
  Coordinate.Logtitude := 49.0564068515288;
  Coordinate.Latitude := 24.1373163639494;
  FThis.FNCMaps1.AddMarkerRec(Coordinate,'','');
end;
1
2
3
4
5
6
7

# 1.2.4. AddMarkerCoordinate

function AddMarkerCoordinate(ALatitude: Double; ALongtitude: Double; ATitle: UnicodeString; AIconURL: UnicodeString): TTMSFNCOpenLayersMarker;
1

  直接指定標記位置,進行標記新增。

  FThis.FNCMaps1.AddMarkerCoordinate(49.05,24.13,'','');
1

# 1.2.5. ClearMarkers

procedure ClearMarkers;
1

  清除所有的地圖示記。

# 1.2.6. ClearPolyLines

procedure ClearPolyLines;
1

  清除所有的折線標記。

# 1.2.7. ClearPolygons

procedure ClearPolygons;
1

  清除所有的多邊形標記。

# 1.2.8. ClearRectangles

procedure ClearRectangles;
1

  清除所有矩形標記。

# 1.2.9. ShowPopup

function ShowPopup(var ACoordinate: TTMSFNCMapsCoordinateRec;AText: UnicodeString; AOffsetX: Double; AOffserY: Double): UnicodeString:
1

  設定顯示彈出式視窗。

# 1.2.10. SetZoomLevel

procedure SetZoomLevel(AZoomLevel: Double);
1

  設定地圖的縮放級別。

# 2. TFNCOpenLayers

  TFNCOpenLayers 繼承于 TFNCMaps,並公開了特定於 OpenLayers API 的額外功能。如需要了解此元件的通用屬性、事件與方法,請參考 TFNCMaps。

# 2.1. TileServer

  當使用此元件時,您可以指定自定義的瓦片圖層伺服器,可在 Options.TileServer 中進行指定。

# 2.1.1. TileLayers

  您可以指定切片圖層列表以顯示地圖圖層的頂部。TileLayers 具有 URL 值和可選 Opacity 值的 tilelayers 集合。

# 2.1.2. 折線與多邊形標籤

  您可以為折線和多邊形指定標籤文字。 預設情況下,標籤文字顯示在折線的中心。可指定的內容屬性如下:

名稱 描述
Label.Text 設定標籤文字
Label.FontColor 設定標籤文字的的字型顏色
Label.FontSize 設定標籤文字的字型大小
Label.OffsetX 設定標籤在X方向上的偏移量
Label.OffsetY 設定標籤在Y方向上的偏移量

# 3. TFNCGeocoding

  此元件用於執行地址地理編碼或者座標反向地理編碼。

# 3.1. 屬性

# 3.1.1. APIKey

property APIKey: UnicodeString;
1

  用於設定APIKey,對於部分地圖資訊提供商,需要填寫此屬性后才可使用。

# 3.1.2. GeocodingRequests

property GeocodingRequests: TTMSFNCGeocodingRequests;
1

  設定地理資訊編碼請求的專案。

# 3.1.3. Service

property Service: TTMSFNCMapsService;
1

  設定地理編碼資訊服務的提供商。可選專案有 gsAzure、gsBing、gsGeoApify、gsGoogle、gsHere、gsMapBox、gsOpenRoute、gsOpenStreetMap。

# 3.2. 事件

事件名稱 觸發方式
OnGetGeocoding 呼叫 GetGeocoding 后觸發。 包含地理編碼操作的結果。 ARequest.Status 和 ARequest.ErrorMessage 值可用於檢視所選服務返回的狀態和錯誤訊息(如果有)。 在多個地理編碼呼叫的情況下,ARequest.ID 值可用於確定結果與哪個呼叫相關聯。 從請求返回的數據可以在 ARequest.Items 集合中找到。
OnGetReverseGeocoding 呼叫 GetReverseGeocoding 后觸發。 包含反向地理編碼操作的結果。 ARequest.Status 和 ARequest.ErrorMessage 值可用於檢視所選服務返回的狀態和錯誤訊息(如果有)。 在多個 GetReverseGeocoding 呼叫的情況下,ARequest.ID 值可用於確定結果與哪個呼叫相關聯。 從請求返回的數據可以在 ARequest.Items 集合中找到。
OnGetGeocodingResult 呼叫 GetGeocoding 后觸發。 包含地理編碼操作的結果。 從請求返回的數據可以在 AResult.Items 集合中找到。
OnGetReverseGeocodingResult 呼叫 GetReverseGeocoding 后觸發。 包含反向地理編碼操作的結果。 從請求返回的數據可以在 AResult.Items 集合中找到。

# 3.3. 方法

# 3.3.1. GetGeocodingAddress

procedure GetGeocodingAddress(AAddress: UnicodeString; AID: UnicodeString; ADataPointer: Pointer; AMode: TTMSFNCMapsLocaleMode);
1

  獲取指定位置的地理地點資訊。

數據數控控制元件
其他控制元件

← 數據數控控制元件 其他控制元件→

Copyright © 2021-2025 愛招飛IsoFace | ALL Rights Reserved
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式