galli_navigation 0.0.3 galli_navigation: ^0.0.3 copied to clipboard
A Galli Navigation Package that works well with Galli Vector Plugin, It has two main methods navigate and navigateWithLatLng
galli_navigation #
galli_navigation
is a Flutter plugin that extends the Galli Vector Plugin by adding navigation capabilities. This plugin allows you to navigate using vector maps from Gallimaps, providing features such as route calculation and turn-by-turn navigation.
Features #
- Turn-by-turn navigation
- Route calculation with various methods (walking/driving/cycling)
- Real-time navigation updates
Installation #
Add galli_navigation
to your pubspec.yaml
file:
dependencies:
galli_navigation: latest
Then, run flutter pub get to install the new dependency.
Usage #
Import the plugin in your Dart code:
import 'package:galli_navigation/galli_navigation.dart';
Basic Example #
Here is a simple example of how to use the galli_navigation plugin:
///initialise gallimethods with token
GalliMethods methods =
GalliMethods("authToken");
NavigateWithLatLng #
LatLng source = LatLng(latitude,longitude);
LatLng destination = LatLng(latitude,longitude);
///navigate with latlng
methods.navigateWithLatLng(
context: context,
source: source,
destination: destination,
method: RoutingMethods.driving);
Navigate with navigation data #
var navJson = await methods.getNavigationData(
source: source,
destination: destination,
method: RoutingMethods.walking);
//navJson will have multiple route options, parse one as NavigationModel then pass to navigate method
NavigationModel navData =
NavigationModel.fromJson(navJson["routes"].first);
methods.navigate(
context: context,
navData: navData,
method: RoutingMethods.driving);
Documentation #
For detailed documentation and advanced usage, please visit the official documentation.