High German map search component Flutter plugin

High moral map 搜索components

High German map 搜索component. Dart interface is generated based on Fluttify engine. Interface document .

Technical Support

  • Please refer to technical-support-plan for operation, technical support tickets will be processed with the highest priority.

Fluttify website

  • Fluttify.com, the generation engine of the Fluttify series of plug-ins, has been launched . You are welcome to try it out. The website is still in its early stages. If you have any suggestions, you can submit an issue in the feedback warehouse .
  • How to use the website?
  1. Log in to the website with a github account, I need to know who is using my website;
  2. Fill in the information related to the native SDK, and automatically complete the network when filling in the maven coordinates and cocoapods name;
  3. Submit the request, currently get the latest version of the target SDK by default to generate the plug-in;
  4. After the request is completed, an email will be sent to the email address associated with the github account, and the product plug-in will be in the attachment of the email;
  • The front end of the website is written using flutter for web (currently the product may be relatively large, and these problems will gradually improve with the official optimization of flutter), deployed on github pages, so the first visit may be unusually slow, please be patient or try a few more Times.

Outsourcing

I undertake outsourcing projects (map apps are preferred), please contact qq 382146139 if you are interested.

installation:

dependencies:
  flutter:
    sdk: flutter
  amap_search_fluttify: ^x.x.x

Import:

import 'package:amap_search_fluttify/amap_search_fluttify.dart';

use:

///! Note: As long as it is a method that returns Future, it is always decorated with `await` to ensure that the next line is executed after the current method is completed. In the environment where `await` cannot be used , execute it in the `then` method One step. 
/// Initializing iOS is set in the init method, android needs to be set in AndroidManifest.xml, see https://lbs.amap.com/api/android-sdk/gettingstarted
await AmapCore.init('ios key');

///! Important: Release the objects on the native side through AmapSearchDisposeMixin, otherwise the native side will leak memory!
class _KeywordPoiScreenState extends State<KeywordPoiScreen> with AmapSearchDisposeMixin {}

/// Search keyword poi
final poiList =  await  AmapSearch .instance. searchKeyword (
                _keywordController.text,
                city: _cityController.text,
              );

/// Search surrounding poi
final poiList = await AmapSearch.instance.searchAround(
                LatLng(
                  double.tryParse(_latController.text) ?? 29.08,
                  double.tryParse(_lngController.text) ?? 119.65,
                ),
                keyword: _keywordController.text,
              );

/// Input prompt
final inputTipList = await AmapSearch.instance.fetchInputTips(
                _keywordController.text,
                city: _cityController.text,
              );

/// Geocoding (address to coordinates)
final geocodeList = await AmapSearch.instance.searchGeocode(
                _keywordController.text,
                city: _cityController.text,
              );

/// Reverse geocoding (coordinate to address)
final reGeocodeList = await AmapSearch.instance.searchReGeocode(
                LatLng(
                  double.parse(_latController.text),
                  double.parse(_lngController.text),
                ),
                radius: 200.0,
              );

/// Get administrative division data
final district = await AmapSearch.instance.searchDistrict(_keywordController.text);

/// Get weather data
final district = await AmapSearch.instance.searchDistrict(_keywordController.text);

/// Bus route planning (unfinished)
final routeResult = await AmapSearch.instance.searchBusRoute(
                from: LatLng(
                  double.parse(_fromLatController.text),
                  double.parse(_fromLngController.text),
                ),
                to: LatLng(
                  double.parse(_toLatController.text),
                  double.parse(_toLngController.text),
                ),
                city :  'Hangzhou' ,
              );

/// Driving path planning
final routeResult = await AmapSearch.instance.searchDriveRoute(
                from: LatLng(
                  double.parse(_fromLatController.text),
                  double.parse(_fromLngController.text),
                ),
                to: LatLng(
                  double.parse(_toLatController.text),
                  double.parse(_toLngController.text),
                ),
              );

/// Cycling path planning
final routeResult = await AmapSearch.instance.searchRideRoute(
                from: LatLng(
                  double.parse(_fromLatController.text),
                  double.parse(_fromLngController.text),
                ),
                to: LatLng(
                  double.parse(_toLatController.text),
                  double.parse(_toLngController.text),
                ),
              );

/// Walking path planning
final routeResult = await AmapSearch.instance.searchWalkRoute(
                from: LatLng(
                  double.parse(_fromLatController.text),
                  double.parse(_fromLngController.text),
                ),
                to: LatLng(
                  double.parse(_toLatController.text),
                  double.parse(_toLngController.text),
                ),
              );

Download Details:

Author: fluttify-project

Source Code: https://github.com/fluttify-project/amap_search_fluttify

#flutter #dart #mobile-apps

High German map search component Flutter plugin
2.05 GEEK