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

GitHub 儲存庫khankhulgun/flutter_map_arcgis

flutter_map_arcgis

適用於 ArcGIS Esri 的 Flutter 地圖外掛程式。目前支援要素圖層(點、多邊形)

flutter_map_arcgis 專案封面
星標
22
分支
22
最近推送(UTC)
2023年12月13日
專案狀態
未封存

原始 README

以下為英文專案原文快照,最新內容請造訪 GitHub。

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.

Khan Khulgun LLC GitHub avatar
GitHub 作者

Khan Khulgun LLC ↗

Ulaanbaatar Mongolia官方網站 ↗
語言DartRubySwiftKotlinObjective-C

此儲存庫發佈的套件

使用的依賴

依賴清單 7 項

如何選擇適合專案的儲存庫?

先依使用情境篩選,再比較專案活躍情況,最後到原始儲存庫確認使用要求。

  1. 透過儲存庫名稱、作者或描述搜尋,再依技術分類縮小範圍。
  2. 綜合星標、分支與最近推送比較專案;星標反映社群關注,不保證品質。
  3. 使用前在 GitHub 確認 README、授權條款與 Issues。

來源與維護

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗