搜索插件、代码仓与 APP 分类

插件详情v1.0.10

atlas

一个可扩展的 Flutter 地图抽象,支持多个地图提供商

AndroidiOSWebmacOSWindowsLinux
近 30 天下载
907
喜欢数
23
Pub 分数
150

安装插件

flutter pub add atlas

插件介绍

基于插件公开信息、社区数据与项目使用情况整理的选型参考。

Atlas 是一个灵活且可扩展的 Flutter 地图抽象,专为与多个地图提供商无缝协作而设计。它提供统一的 API 来集成各种地图服务,简化了跨平台开发。支持 Android、iOS、Web、macOS、Windows 和 Linux,Atlas 可确保无论底层提供商如何,都能提供一致的地图体验。开发者可以轻松在不同提供商之间切换,或通过自定义实现扩展功能。该包强调模块化、性能和在地理定位密集型应用中的易用性。

适合场景

  • 跨平台地图集成
  • 多提供商地图切换
  • 自定义地图图层实现
  • 基于地理位置的应用程序功能
  • 地图自定义和样式

主要特点

  • 支持多种地图提供商
  • 跨平台统一 API
  • 可扩展架构
  • 平台无关的地图渲染
  • 内置地图交互处理

适合对象

  • 开发跨平台应用的开发者
  • 使用不同地图服务的团队
  • 需要可自定义地图行为的应用
  • 需要提供方灵活性的项目
  • 地理空间数据可视化

使用建议

  • 每个地图提供商都需要进行配置
  • 移动设备原生 SDK 的附加设置
  • 高级扩展的文档有限
  • 取决于提供方特定权限
  • 复杂叠加层可能带来的性能影响

原始 README

以下为关联源码仓库的 README 原文快照,最新内容请访问源码仓库。

Atlas

Build Status codecov

An extensible map abstraction for Flutter with support for multiple map providers

Package Pub
atlas pub package
google_atlas pub package

Quick Start

Setup
import 'package:flutter/material.dart';
import 'package:atlas/atlas.dart';
/// import your `AtlasProvider` of choice
import 'package:custom_atlas/custom_atlas.dart';

void main() {
  /// Set your `AtlasProvider` instance
  AtlasProvider.instance = CustomAtlas();
  runApp(MyApp());
}
Usage
class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Atlas Sample Demo',
      home: AtlasSample(),
    );
  }
}

class AtlasSample extends StatelessWidget {
  final _initialCameraPosition = LatLng(
    latitude: 37.42796133580664,
    longitude: -122.085749655962,
  );
  final _markers = Set<Marker>.from([
    Marker(
      id: 'marker-1',
      position: LatLng(
        latitude: 37.42796133580664,
        longitude: -122.085749655962,
      ),
      icon: MarkerIcon(
        assetName: 'assets/marker.png',
      ),
      anchor: Anchor(
        x: 0.5,
        y: 1.0,
      )
      onTap: () {
        print('tapped marker-1');
      },
    )
  ]);
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      /// Use `Atlas` as your Map Widget
      body: Atlas(
        initialCameraPosition: _initialCameraPosition,
        markers: _markers,
      ),
    );
  }
}

Maintainers

This project is maintained by BMW Group.

Thank you to the original authors

License

MIT License

Copyright (c) 2019 BMW Technology Corporation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

所属分类

源码仓库

使用此插件的项目

暂无相关数据。