搜索插件、代码仓与 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 项

源码仓库

使用此插件的项目

暂无相关数据。