Skip to content

Flutter plugin for displaying an interactive flat world map with animated data points. It supports real-time data, customizable points, markers, zoom, and move animations, optimized for large data sets.

License

Notifications You must be signed in to change notification settings

tiamo/flutter-simple-map

Repository files navigation

🗺️ Flutter Simple Map

A Flutter plugin, which displays a simple flat world map with animated dots, useful for real time data representation. Can be used as a presentation of online users, devices, etc.

Build Status Pub package Star on GitHub License: MIT

Getting Started

  • Add this to your pubspec.yaml
    dependencies:
    simple_map: ^1.0.0
    
  • Get the package from Pub:
    flutter packages get
    
  • Import it in your file
    import 'package:simple_map/simple_map.dart';
    

Features

  • 🚀 Good performance with lot of data
  • 🌎 Render simple customizable flat map
  • 🪄 Render points with animation effect
  • ✨ Customize every point
  • ⏱️ Create points with TTL
  • 📍 Marker support
  • 🔍 Zoom and Move animations

Usage

  • Using SimpleMapOptions
final mapOptions = SimpleMapOptions(
    // Custom map icon with projection
    // mapIcon: IconData(0xe900, fontFamily: 'MapIcons'),
    // projection: ...
  
    mapColor: Colors.grey,
    bgColor: Colors.black,
    // Default point color
    pointColor: Colors.blue,
    
    interactive: true,
    
    // 3d effect
    withShadow: true,
    shadowOffset = const Offset(0.0, 0.5),
);
  • Using SimpleMapController
final SimpleMapController mapController = SimpleMapController();

// Add single point.
mapController.addPoint(SimpleMapPoint());

// Add list of points
mapController.points = [SimpleMapPoint()];

// Clear the map.
mapController.clear();

SimpleMap(
  controller: mapController,
  options: mapOptions,
),
  • Simple map with one center point with duration of 100 seconds
SimpleMap(
  controller: SimpleMapController(points: [
    SimpleMapPoint(
      lat: 0.0,
      lng: 0.0,
      color: Colors.blue,
      ttl: Duration(seconds: 100),
    )
  ]),
  options: mapOptions,
),

Check out the complete Example

Changelog

Please have a look in CHANGELOG

Maintainers

License

License: MIT

About

Flutter plugin for displaying an interactive flat world map with animated data points. It supports real-time data, customizable points, markers, zoom, and move animations, optimized for large data sets.

Topics

Resources

License

Stars

Watchers

Forks

Languages