パッケージ、リポジトリ、アプリカテゴリを検索

パッケージ詳細v1.0.0

map_zone_manager

Googleマップ上でゾーンを作成、マーク、管理するための強力なFlutterパッケージです。マルチゾーン対応、カスタムマップスタイル、カメラ制御などの機能を備えており、スムーズなユーザー体験を提供します。

AndroidiOSWeb
30日間ダウンロード
24
いいね数
2
Pub ポイント
140

パッケージをインストール

flutter pub add map_zone_manager

パッケージ概要

公開情報に基づく選定ガイドです。参考としてご利用ください。

MapZoneManager は、Google マップ上でゾーンの作成、マーク、管理を簡素化することを目的とした Flutter パッケージです。複数のゾーンをサポートし、マップスタイルのカスタマイズが可能で、スムーズなナビゲーションに向けた正確なカメラ制御を提供します。配達エリア、イベントゾーン、ジオフェンシングなど、空間的なゾーン可視化が必要なアプリケーションに最適です。Android、iOS、Web プラットフォームとシームレスに統合され、開発者がインタラクティブな地図ベース機能を実装するための堅牢なソリューションを提供します。

用途

  • 配達エリアの可視化
  • ジオフェンシングアプリケーション
  • イベントゾーン計画
  • インタラクティブマップの注釈
  • 位置ベースのサービス
  • リアルタイムゾーントラッキング

主な機能

  • マルチゾーン対応
  • カスタマイズ可能なマップスタイル
  • カメラ制御ユーティリティ
  • ゾーン作成ツール
  • インタラクティブゾーンマーカー
  • クロスプラットフォーム互換性

適している対象

  • 場所を認識するアプリを開発している開発者
  • ゾーンベースのマップインタラクションが必要なチーム
  • ジオフェンシングまたは配達ゾーンを使用するアプリケーション
  • Webおよびモバイルマップ統合
  • 動的マップの注釈を必要とするプロジェクト

注意事項

  • Google Maps API キーが必要です
  • Google マップ統合に限定
  • 多数のゾーンに対してパフォーマンスチューニングが必要になる可能性があります
  • マップレンダリングには安定したインターネット接続が必要です
  • Webプラットフォーム用の追加設定が必要です

元の README

関連するソースリポジトリの README 原文のスナップショットです。最新の内容はリポジトリをご覧ください。

MapZoneManager

MapZoneManager is a Flutter package that provides a widget and controller to manage zones on a Google Map. It allows you to create, update, and manage multiple zones, with features for handling map markers, polygons, and custom actions like adding or resetting zones. It supports both single and multi-zone management and is highly customizable with features like custom buttons and map styles.

Zone Creation Demo

Zone View Demo

Features

  • Zone Creation: Create zones by tapping on the map and adding coordinates to form a polygon.
  • Multiple Zones: Supports managing multiple zones on the map.
  • Customizable: Customize zone colors, border colors, and border width.
  • View-Only Mode: Ability to display zones in a read-only mode (no zone creation).
  • Custom Buttons: Option to replace the default add/reset zone buttons with custom widgets.
  • Markers & Polygons: Displays markers and polygons for each zone created on the map.
  • Zoom Controls: Enable/disable zoom controls and gestures.
  • Location Services: Enable location tracking and display of the user's current location.
  • Map Styles: Apply different map styles to customize the appearance of the map.

Installation

To add the package to your Flutter project, update your pubspec.yaml file: Run flutter pub get to install the dependencies.

dependencies:
  map_zone_manager: ^0.0.1 

Usage

Basic Usage

To use the MapZoneManager widget, you need to add it to your widget tree. Here's a basic example:

import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:map_zone_manager/map_zone_manager.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: Text('Map Zone Manager')),
        body: MapZoneManager(
          initialCameraPosition: CameraPosition(target: LatLng(37.7749, -122.4194), zoom: 12),
          multiZone: true,
          showAddButton: true,
          showResetButton: true,
          viewOnly: false,
          onZoneAdded: (zone) {
            print('New Zone Added: ${zone.zoneId}');
          },
        ),
      ),
    );
  }
}
Parameters
MapZoneManager
  • initialCameraPosition: The initial camera position for the map (optional).
  • markerIcon: The icon for the markers (optional).
  • multiZone: Whether multiple zones can be added (default is true).
  • showAddButton: Whether to show the button to add a zone (default is true).
  • showResetButton: Whether to show the button to reset the zone (default is true).
  • viewOnly: Whether the map is in view-only mode (default is false).
  • addButtonWidget: Custom widget for the add button (optional).
  • resetButtonWidget: Custom widget for the reset button (optional).
  • zones: A list of initial zones to display on the map (optional).
  • onZoneAdded: A callback triggered when a new zone is added (optional).
  • mapStyle: The map style to apply (optional, defaults to MapStyle.standard).
  • mapZoneManagerController: A controller to manage map zones (optional).
  • minimumCoordinatesForAdding: The minimum number of coordinates required to create a zone (default is 2).
  • defaultZoneColor: The default fill color for zones (default is Colors.yellow).
  • defaultBorderColor: The default border color for zones (default is Colors.black).
  • defaultBorderWidth: The default border width for zones (default is 2).
  • currentZoneColor: The color for the current zone being created (default is Colors.red).
  • currentBorderColor: The color for the current zone's border (default is Colors.black).
  • currentBorderWidth: The width of the current zone's border (default is 2).
  • onTap: A callback triggered when the map is tapped (optional).
  • onLongPress: A callback triggered when the map is long-pressed (optional).
  • zoomControlsEnabled: Whether zoom controls are enabled (default is true).
  • zoomGesturesEnabled: Whether zoom gestures are enabled (default is true).
  • myLocationEnabled: Whether the user's current location is displayed (default is false).
  • myLocationButtonEnabled: Whether the "My Location" button is enabled (default is true).
MapZoneManagerController

The MapZoneManagerController is a controller class for managing zones and map-related operations. You can use this controller to manage zones, add coordinates, and move the camera to fit a zone.

MapZoneManagerController controller = MapZoneManagerController(
  onZoneAdded: (zone) {
    print('New Zone Added: ${zone.zoneId}');
  },
  multiZone: true,
);

controller.createZone();
controller.addPositionOnCurrentZone(LatLng(37.7749, -122.4194));

License

This package is licensed under the MIT License. See the LICENSE file for more details.

カテゴリー

依存関係

依存関係一覧 3 件

ソースリポジトリ

このパッケージを使用しているプロジェクト

データはまだありません。