पैकेज, रिपॉज़िटरी और ऐप श्रेणियाँ खोजें

पैकेज विवरणv0.1.1+2

google_maps_flutter_heatmap

iOS और Android ऐप में Google Maps को एकीकृत करने के लिए एक Flutter प्लगइन। थर्मल मानचित्र समर्थन के साथ

30-दिन डाउनलोड
5
लाइक
21
Pub अंक
40

पैकेज इंस्टॉल करें

flutter pub add google_maps_flutter_heatmap

पैकेज अवलोकन

सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।

एक फ्लटर प्लगइन जो iOS और एंड्रॉयड ऐप में गूगल मैप्स के एकीकरण की अनुमति देता है, समावेशी गर्मी-मैप विज़ुअलाइज़ेशन के साथ। यह डेटा बिंदुओं का उपयोग करके मैप्स पर घनत्व-आधारित गर्मी-मैप्स प्रदर्शित करने की अनुमति देता है, जिससे भौगोलिक डेटा के प्रतिनिधित्व में सुधार होता है। प्लगइन को फ्लटर ऐप्लिकेशन में बिना किसी दिक्कत के काम करने के लिए डिज़ाइन किया गया है और ऑप्टिमल प्रदर्शन के लिए मूल गूगल मैप्स SDK का उपयोग करता है। गर्मी-मैप्स यातायात घनत्व, उपयोगकर्ता गतिविधि या घटना समूहन जैसे पैटर्न को दिखाने के लिए उपयोगी होते हैं। पैकेज GitHub पर बनाए रखा जाता है और pub के माध्यम से जोड़ा जा सकता है।

उपयोग

  • भूगोलिक डेटा घनत्व का दृश्यीकरण
  • उपयोगकर्ता गतिविधि हॉटस्पॉट प्रदर्शित करें
  • ट्रैफिक या गतिशीलता पैटर्न का विश्लेषण करना
  • घटना सांद्रता का मैपिंग
  • स्थान-आधारित विश्लेषण में सुधार करना

मुख्य विशेषताएँ

  • हीटमैप परत रेंडरिंग का समर्थन करता है
  • Google Maps SDK के साथ एकीकृत
  • रियल-टाइम थर्मल मैप अपडेट
  • कस्टमाइज़ेबल थर्मल मैप रंग और तीव्रता
  • हल्का और आसानी से कार्यान्वित करने योग्य

इनके लिए उपयुक्त

  • स्थान-आधारित ऐप में डेटा विज़ुअलाइज़ेशन
  • स्थानिक विश्लेषण की आवश्यकता वाले मोबाइल एप्लिकेशन
  • उच्च घनत्व बिंदु डेटा वाले एप्लिकेशन
  • Flutter में Google Maps का उपयोग करने वाले विकासकर्ता
  • इंटरैक्टिव मानचित्र परतों की आवश्यकता वाले प्रोजेक्ट

विचार योग्य बातें

  • Google Maps API की की आवश्यक है
  • iOS और Android प्लेटफॉर्म के लिए सीमित
  • बहुत बड़े डेटासेट के साथ हीटमैप प्रदर्शन कम हो सकता है
  • बाहरी Google Maps SDK पर निर्भर
  • उत्पादन डेप्लॉयमेंट के लिए अतिरिक्त कॉन्फ़िगरेशन की आवश्यकता हो सकती है

मूल README

संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।

Google Maps for Flutter (Developers Preview)

Find and sponsor issues pub package Flutter CI

A Flutter plugin that provides a Google Maps widget with heatmap support.

Developers Preview Status

The plugin relies on Flutter's new mechanism for embedding Android and iOS views. As that mechanism is currently in a developers preview, this plugin should also be considered a developers preview.

Known issues are tagged with the platform-views and/or maps labels.

To use this plugin on iOS you need to opt-in for the embedded views preview by adding a boolean property to the app's Info.plist file, with the key io.flutter.embedded_views_preview and the value YES.

The API exposed by this plugin is not yet stable, and we expect some breaking changes to land soon.

Usage

To use this plugin, add google_maps_flutter_heatmap as a dependency in your pubspec.yaml file.

Getting Started

Get an API key at https://cloud.google.com/maps-platform/.

Android

Specify your API key in the application manifest android/app/src/main/AndroidManifest.xml:

<manifest ...
  <application ...
    <meta-data android:name="com.google.android.geo.API_KEY"
               android:value="YOUR KEY HERE"/>
iOS

Specify your API key in the application delegate ios/Runner/AppDelegate.m:

#include "AppDelegate.h"
#include "GeneratedPluginRegistrant.h"
#import "GoogleMaps/GoogleMaps.h"

@implementation AppDelegate

- (BOOL)application:(UIApplication *)application
    didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  [GMSServices provideAPIKey:@"YOUR KEY HERE"];
  [GeneratedPluginRegistrant registerWithRegistry:self];
  return [super application:application didFinishLaunchingWithOptions:launchOptions];
}
@end

Or in your swift code, specify your API key in the application delegate ios/Runner/AppDelegate.swift:

import UIKit
import Flutter
import GoogleMaps

@UIApplicationMain
@objc class AppDelegate: FlutterAppDelegate {
  override func application(
    _ application: UIApplication,
    didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?
  ) -> Bool {
    GMSServices.provideAPIKey("YOUR KEY HERE")
    GeneratedPluginRegistrant.register(with: self)
    return super.application(application, didFinishLaunchingWithOptions: launchOptions)
  }
}

Opt-in to the embedded views preview by adding a boolean property to the app's Info.plist file with the key io.flutter.embedded_views_preview and the value YES.

Both

You can now add a GoogleMap widget to your widget tree.

The map view can be controlled with the GoogleMapController that is passed to the GoogleMap's onMapCreated callback.

Sample Usage
import 'dart:async';

import 'package:flutter/material.dart';
import 'package:google_maps_flutter_heatmap/google_maps_flutter_heatmap.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Google Maps Demo',
      home: MapSample(),
    );
  }
}

class MapSample extends StatefulWidget {
  @override
  State<MapSample> createState() => MapSampleState();
}

class MapSampleState extends State<MapSample> {
  Completer<GoogleMapController> _controller = Completer();
  final Set<Heatmap> _heatmaps = {};
  static final CameraPosition _kGooglePlex = CameraPosition(
    target: LatLng(37.42796133580664, -122.085749655962),
    zoom: 14.4746,
  );
  LatLng _heatmapLocation = LatLng(37.42796133580664, -122.085749655962);
  static final CameraPosition _kLake = CameraPosition(
      bearing: 192.8334901395799,
      target: LatLng(37.43296265331129, -122.08832357078792),
      tilt: 59.440717697143555,
      zoom: 19.151926040649414);

  @override
  Widget build(BuildContext context) {
    return new Scaffold(
      body: GoogleMap(
        mapType: MapType.hybrid,
        initialCameraPosition: _kGooglePlex,
        heatmaps: _heatmaps,
        onMapCreated: (GoogleMapController controller) {
          _controller.complete(controller);
        },
      ),
      floatingActionButton: FloatingActionButton.extended(
        onPressed: _goToTheLake,
        label: Text('To the lake!'),
        icon: Icon(Icons.directions_boat),
      ),
      floatingActionButton: FloatingActionButton.extended(
        onPressed: _addHeatmap,
        label: Text('Add Heatmap'),
        icon: Icon(Icons.add_box),
      ),
    );
  }
  void _addHeatmap(){
    setState(() {
      _heatmaps.add(
        Heatmap(
          heatmapId: HeatmapId(_heatmapLocation.toString()),
          points: _createPoints(_heatmapLocation),
          radius: 20,
          visible: true,
          gradient:  HeatmapGradient(
            colors: <Color>[Colors.green, Colors.red], startPoints: <double>[0.2, 0.8]
          )
        )
      );
    });
  }
  //heatmap generation helper functions
  List<WeightedLatLng> _createPoints(LatLng location) {
    final List<WeightedLatLng> points = <WeightedLatLng>[];
    //Can create multiple points here
    points.add(_createWeightedLatLng(location.latitude,location.longitude, 1));
    points.add(_createWeightedLatLng(location.latitude-1,location.longitude, 1)); 
    return points;
  }

  WeightedLatLng _createWeightedLatLng(double lat, double lng, int weight) {
    return WeightedLatLng(point: LatLng(lat, lng), intensity: weight);
  }

  Future<void> _goToTheLake() async {
    final GoogleMapController controller = await _controller.future;
    controller.animateCamera(CameraUpdate.newCameraPosition(_kLake));
  }
}

See the example directory for a complete sample app.

श्रेणियाँ

सोर्स रिपॉज़िटरी

इस पैकेज का उपयोग करने वाले प्रोजेक्ट

अभी कोई डेटा उपलब्ध नहीं है।