polymaker 1.0.3 icon indicating copy to clipboard operation
polymaker: ^1.0.3 copied to clipboard

Polymaker is a flutter package used to get a list of locations for polygon google maps

Polymaker #

Fork  Star  Watches  Get the library  Example

Polymaker is a flutter package to make it easier to map polygon locations in Google Maps, because the appearance is realtime when in Edit Mode, so we know the exact position without guessing through the backend system. Polymaker can be run with only one line of code, and returns the location's List value.

Tools Feature: #

  • Get Current Location
  • Entering Edit Mode
  • Closing Edit Mode
  • Done Editing
  • Undo Editing to Previous Location
  • Realtime polygon to view result
  • Custom Marker as Pointing Number
  • Point Distance
  • Tracking Mode LINEAR & PLANAR
  • Custom Map Type

Billing #

You must enable some API in google cloud to use this features

  • Google Maps for Android/iOS

Setup #


Adding Permission in android/app/src/main/AndroidManifest.xml

<uses-permission  android:name="android.permission.INTERNET"/>
<uses-permission  android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission  android:name="android.permission.ACCESS_FINE_LOCATION" />

Insert Google Maps Key in android/app/src/main/AndroidManifest.xml

	<meta-data  android:name="com.google.android.geo.API_KEY"
		android:value="<YOUR API KEY>"/>
	<meta-data  android:name="com.google.android.gms.version"
		android:value="@integer/google_play_services_version" />

Setup your SDK Version to the latest in android/app/build.gradle

compileSdkVersion 29
defaultConfig {
  targetSdkVersion 29


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];

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

import UIKit
import Flutter
import GoogleMaps

@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; you need also to define NSLocationWhenInUseUsageDescription

  <string>This app needs your location to test the location feature of the Google Maps location picker plugin.</string>

How To Use #

Using polymaker is very easy and only needs to use one line of code

import  'package:polymaker/polymaker.dart'  as polymaker;

// Open polymaker and get return List<LatLng>
var result =  await polymaker.getLocation(context);

Custom Property in getLocation() #

PropertyDescriptionData Type
toolColorProperty to customize tool colorColor
polygonColorProperty to customize polygon colorColor
iconLocationProperty to customize location iconIconData
iconEditModeProperty to customize edit mode iconIconData
iconCloseEditProperty to customize close tool iconIconData
iconDoneEditProperty to customize done iconIconData
iconUndoEditProperty to customize undo iconIconData
iconGPSPointProperty to use GPS data as tracking pointIconData
autoEditModeAutomatic enable edit modeBoolean
pointDistanceEnable / Disable Point DistanceBoolean
trackingModeChoose Tracking mode between polygon or polylineTrackingMode
targetCameraPositionSet initial camera locationsLatLng
enableDragMarkerEnabling drag to marker positionBoolean
pub points


verified publisher iconleeyurani.com

Polymaker is a flutter package used to get a list of locations for polygon google maps

Repository (GitHub)


API reference


Icon for licenses.MIT (LICENSE)


flutter, geolocator, google_maps_flutter, provider


Packages that depend on polymaker