📔
Ridy Flutter
  • 💁Introduction
  • đŸ› ī¸Installation
    • Firebase
    • Server
    • Client
    • Web Application
    • Update
  • 🎨Configuration
    • Admin Panel's Logo and Branding
    • Show Directions
    • Map SDK
    • Measurement System
  • â„šī¸Usage
    • Setup
    • Financials
    • Marketing
    • Management
    • Fleets
    • Online Payments
    • Complaints
  • 🛟Support
    • FAQ
    • Issue
Powered by GitBook
On this page
  • OpenStreet Map
  • Google Maps
  • MapBox
  • Activate the default SDK
  1. Configuration

Map SDK

PreviousShow DirectionsNextMeasurement System

Last updated 1 year ago

The application supports 3 different map providers out of the box, In this section we will cover how to activate each one of them and also how to activate one as default.

OpenStreet Map

A free option in case you want to have your solution's running costs minimized. This SDK does not require any additional configuration to work and the source code downloaded is already set to use this option by default.

Google Maps

Probably the most famous Maps SDK offering great location coverage and decent aesthetics. In order to configure Google Maps you can refer to their official documentation:

MapBox

constants.dart
/class Constants {
  static const String serverIp = "";
  static const int resendOtpTime = 90;
  static const bool isDemoMode = false;
  static bool showTimeIn24HourFormat = true;
  static final CountryCode defaultCountry = CountryCode.parseByIso('US');

  static MapBoxProvider get mapBoxProvider => MapBoxProvider(
        secretKey: "",
        userId: "mapbox",
        tileSetId: "streets-v12",
      );

Activate the default SDK

Once either one of Maps SDK options is activated you can easily switch between them. Head to libs->flutter_common->lib->config->constants.dart and change the defaultMapProvider's value to the one of your choice. Notice that this is an enum structure and below you can find the acceptable values for it:

enum MapProviderEnum {
  googleMaps,
  openStreetMaps,
  mapBox,
}

In order to configure the MapBox you will need a secret key which you can retrieve by registering on the . Once retrieved head to libs->flutter_common->lib->config->constants.dart and enter the retrieved secret key under the mapBoxProvider Object's secretKey parameter:

🎨
MapBox website
google_maps_flutter | Flutter PackageDart packages
Logo