All Projects → blackmann → Locationpicker

blackmann / Locationpicker

Licence: other
Location picker for Flutter.

Programming Languages

dart
5743 projects

Projects that are alternatives of or similar to Locationpicker

Magrit
♠ Thematic cartography ♠
Stars: ✭ 60 (-28.57%)
Mutual labels:  maps
Mapgen2
Map generator for games. Generates island maps with a focus on mountains, rivers, coastlines.
Stars: ✭ 1,188 (+1314.29%)
Mutual labels:  maps
React Native Streetview
React Native Google's Panorama/StreetView component for iOS and Android.
Stars: ✭ 79 (-5.95%)
Mutual labels:  maps
Curve Fit
Curve-Fit is an Android library for drawing curves on Google Maps
Stars: ✭ 63 (-25%)
Mutual labels:  maps
Editor
An open source visual editor for the 'Mapbox Style Specification'
Stars: ✭ 1,167 (+1289.29%)
Mutual labels:  maps
Deck.gl
WebGL2 powered visualization framework
Stars: ✭ 9,304 (+10976.19%)
Mutual labels:  maps
Geo Maps
🗺 High Quality GeoJSON maps programmatically generated.
Stars: ✭ 1,098 (+1207.14%)
Mutual labels:  maps
Supercluster
A very fast geospatial point clustering library for browsers and Node.
Stars: ✭ 1,246 (+1383.33%)
Mutual labels:  maps
Openmaptiles
OpenMapTiles Vector Tile Schema Implementation
Stars: ✭ 1,175 (+1298.81%)
Mutual labels:  maps
Examples
Self-contained examples for the legacy Maps API for JavaScript.
Stars: ✭ 78 (-7.14%)
Mutual labels:  maps
Easymap
Ready to use Address Selection Library using Google Maps and Places API.
Stars: ✭ 66 (-21.43%)
Mutual labels:  maps
Making Maps With React
🌐 Example React components for React-Leaflet, Pigeon Maps, React MapGL and more
Stars: ✭ 66 (-21.43%)
Mutual labels:  maps
Vscode Vega Viewer
VSCode extension for Interactive Preview of Vega & Vega-Lite maps 🗺️ & graphs 📈
Stars: ✭ 75 (-10.71%)
Mutual labels:  maps
Ol Games
🎮 Game stuff for Openlayers, powered by HTML5, canvas, javascript and Openlayers.
Stars: ✭ 61 (-27.38%)
Mutual labels:  maps
Obaddon
A repository of community-built prefabs and other enhancements for Oblige 7.70
Stars: ✭ 81 (-3.57%)
Mutual labels:  maps
Explorer
WorldWindExplorer: A 3D virtual globe geo-browser app framework based on WorldWindJS, Bootstrap and KnockoutJS. Includes 3D globe and 2D map projections, imagery, terrain, markers, plus solar and celestial data.
Stars: ✭ 59 (-29.76%)
Mutual labels:  maps
Mrpt
⚡️ The Mobile Robot Programming Toolkit (MRPT)
Stars: ✭ 1,190 (+1316.67%)
Mutual labels:  maps
Pinpoint
JavaScript library for creating beautifully simple maps in seconds
Stars: ✭ 83 (-1.19%)
Mutual labels:  maps
Nativescript Directions
👆 👉 👇 👈 Open the Maps app to show directions to anywhere you like
Stars: ✭ 81 (-3.57%)
Mutual labels:  maps
Deep merge
Deep (recursive) merge for maps, keywords and others in Elixir
Stars: ✭ 75 (-10.71%)
Mutual labels:  maps

Flutter Place Picker Pub

The missing location picker made in Flutter for Flutter. With dark theme and custom localization support.

⚠️ Please note: This library will NOT be affected by the deprecation of Place Picker as indicated here.

🍭 Remember to enable Places API, Maps SDK for Android, Maps SDK for iOS and Geocoding API for your API key.

Usage

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

Getting Started

This package relies on google_maps_flutter to display the map. Follow these guidelines to add your API key to the Android and iOS packages.

Get an API key at https://cloud.google.com/maps-platform/ if you haven't already.

Android

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

<manifest ...

  <!-- Add this permission -->
  <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

  <application ...
    <!-- Add your api key here -->
    <meta-data android:name="com.google.android.geo.API_KEY"
               android:value="YOUR KEY HERE"/>
    <activity ..../>
  </application>
</manifest>

Update your gradle.properties file with this:

android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536M

Please also make sure that you have those dependencies in your build.gradle:

  // parent level build.gradle (android/build.gradle)
  dependencies {
      classpath 'com.android.tools.build:gradle:3.3.0'
      classpath 'com.google.gms:google-services:4.2.0'
  }
  ...

  // app level build.gradle (android/app/build.gradle)
  compileSdkVersion 28

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.

info.plist

Also add these to the dict values in Info.plist for location request to work on iOS info.plist

Sample Usage

Import the package into your code

import 'package:place_picker/place_picker.dart';

Create a method like below, and call it in onTap of a button or InkWell. A LocationResult will be returned with the name and lat/lng of the selected place. You can then handle the result in any way you want. Pass in an optional LatLng displayLocation to display that location instead. This is useful when you want the map to display the previously selected location.

void showPlacePicker() async {
    LocationResult result = await Navigator.of(context).push(MaterialPageRoute(
        builder: (context) =>
            PlacePicker("YOUR API KEY",
                        displayLocation: customLocation,
                        )));

    // Handle the result in your way
    print(result);
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].