搜尋套件、儲存庫與 APP 分類

套件詳情v2.0.6

flutter_map_arcgis

適用於 Flutter 地圖的 Arcgis 插件。功能包括支援獨特渲染、點擊事件、帶屬性的點擊事件、幾何類型(點、多邊形、折線)

AndroidiOS
近 30 天下載
143
喜歡數
37
Pub 分數
120

安裝套件

flutter pub add flutter_map_arcgis

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

一個將 ArcGIS 功能整合到 flutter_map 庫中的 Flutter 插件,讓開發者能夠從 ArcGIS 服務渲染 GIS 資料。它支援多種幾何類型,包括點、折線和多邊形,具備可自訂的渲染與互動功能,例如 onTap 事件和屬性存取。專為 Android 和 iOS 設計,此插件透過豐富的地空間功能提升地圖應用。該插件為開源,並在 GitHub 上維護。

適用情境

  • 顯示 ArcGIS 地圖圖層
  • 帶有點擊事件的互動式GIS地圖
  • 可視化空間資料,如點和多邊形
  • 使用 ArcGIS 結合建立基於位置的應用程式
  • 渲染動態地理空間內容

主要特色

  • 支援點、折線與多邊形幾何圖形
  • 可自定義的 ArcGIS 圖層渲染
  • OnTap 事件處理與屬性
  • 與 flutter_map 的整合
  • 開源且持續維護

適合對象

  • 使用ArcGIS資料的開發人員
  • 需要互動式GIS地圖的應用程式
  • 需要地理空間可視化的行動應用程式
  • 建構位置感知 Flutter 應用的團隊
  • 涉及空間資料分析的項目

使用建議

  • 需要 ArcGIS 服務 URL
  • 僅限 Android 與 iOS 平台
  • 依賴 flutter_map 相容性
  • 可能需要額外設定以支援複雜圖層
  • 效能取決於資料大小與網路速度

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Flutter Map plugin for ArcGIS Esri

Currently support feature layer(point, polygon, polyline)

We are working on more features

A Dart implementation of Esri Leaflet for Flutter apps. This is a plugin for flutter_map package

Usage

Add flutter_map, dio and flutter_map_arcgis to your pubspec:

dependencies:
  flutter_map: any
  flutter_map_arcgis: any # or the latest version on Pub
  dio: any # or the latest version on Pub

Add it in you FlutterMap and configure it using FeatureLayerOptions.

import 'package:flutter/material.dart';
import 'package:flutter_map_arcgis/flutter_map_arcgis.dart';
import 'package:flutter_map/flutter_map.dart';
import 'package:latlong2/latlong.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: Text('ArcGIS')),
        body: Padding(
          padding: EdgeInsets.all(8.0),
          child: Column(
            children: [
              Flexible(
                child: FlutterMap(
                  options: MapOptions(
                    // center: LatLng(39.7644863,-105.0199111), // line
                    center: LatLng(35.611909, -82.440682),
                    zoom: 14.0,


                  ),
                  children: [
                    TileLayer(
                      urlTemplate:
                      'http://{s}.google.com/vt/lyrs=m&x={x}&y={y}&z={z}',
                      subdomains: ['mt0', 'mt1', 'mt2', 'mt3'],
                    ),
                    // FeatureLayer(FeatureLayerOptions("https://services.arcgis.com/P3ePLMYs2RVChkJx/arcgis/rest/services/USA_Congressional_Districts/FeatureServer/0",
                    //   "polygon",
                    //   onTap: (dynamic attributes, LatLng location) {
                    //     print(attributes);
                    //   },
                    //   render: (dynamic attributes){
                    //     return PolygonOptions(
                    //         borderColor: Colors.red,
                    //         color: Colors.black45,
                    //         borderStrokeWidth: 2,
                    //         isFilled:true
                    //     );
                    //   },
                    // ),)
                    FeatureLayer(
                        FeatureLayerOptions(
                          "https://services.arcgis.com/V6ZHFr6zdgNZuVG0/arcgis/rest/services/Landscape_Trees/FeatureServer/0",
                          "point",
                          render:(dynamic attributes){
                            // You can render by attribute
                            return PointOptions(
                              width: 30.0,
                              height: 30.0,
                              builder: const Icon(Icons.pin_drop),
                            );
                          },
                          onTap: (attributes, LatLng location) {
                            print(attributes);
                          },
                        )
                    ),
                    // FeatureLayer(FeatureLayerOptions(
                    //   "https://services.arcgis.com/V6ZHFr6zdgNZuVG0/ArcGIS/rest/services/Denver_Streets_Centerline/FeatureServer/0",
                    //   "polyline",
                    //   render:(dynamic attributes){
                    //     // You can render by attribute
                    //     return PolygonLineOptions(
                    //         borderColor: Colors.red,
                    //         color: Colors.red,
                    //         borderStrokeWidth: 2
                    //     );
                    //   },
                    //   onTap: (attributes, LatLng location) {
                    //     print(attributes);
                    //   },
                    // ))

                  ],
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}


Run the example

See the example/ folder for a working example app.

所屬分類

依賴

依賴清單 5 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。