GemMap constructor

const GemMap({
  1. Key? key,
  2. void onMapCreated(
    1. GemMapController
    )?,
  3. AndroidViewMode androidViewMode = AndroidViewMode.auto,
  4. Coordinates? coordinates,
  5. RectangleGeographicArea? area,
  6. int? zoomLevel,
  7. String? appAuthorization,
  8. String? initialMapStyleAsset,
  9. bool allowInternetConnection = true,
  10. AutoUpdateSettings? autoUpdateSettings,
})

Creates a GemMap widget.

Parameters

  • IN onMapCreated Callback method for when the map is ready to be used.

  • IN androidViewMode Mode of hosting native Android view in Flutter. Defaults to AndroidViewMode.auto.

  • IN coordinates Initial coordinates of the center of the map

  • IN area Initial area to center the map on

  • IN zoomLevel Initial zoom level to center the map on

  • IN appAuthorization Application token that enables the SDK. Required for evaluation SDKs. Not taken into account if the SDK has already been initialized.

  • IN initialMapStyleAsset A field that holds the asset path for the initial map style.

    This field represents the path to a map style file (.style extension) that is stored in the Flutter project's asset directory. The map style will be applied to the map when it is first created. The asset path must be relative to the root of the assets directory, as declared in the pubspec.yaml file.

    Example:

    'assets/map_styles/my_map_style.style',

  • IN autoUpdateSettings Auto update settings. Not taken into account if the SDK has already been initialized.

    Related Documentation:

    For more details on how to create your own map styles see Studio Documentation.

Implementation

const GemMap({
  super.key,
  final void Function(GemMapController)? onMapCreated,
  final AndroidViewMode androidViewMode = AndroidViewMode.auto,
  final Coordinates? coordinates,
  final RectangleGeographicArea? area,
  final int? zoomLevel,
  final String? appAuthorization,
  final String? initialMapStyleAsset,
  final bool allowInternetConnection = true,
  final AutoUpdateSettings? autoUpdateSettings,
})  : _initialMapStyleAsset = initialMapStyleAsset,
      _appAuthorization = appAuthorization,
      _zoomLevel = zoomLevel,
      _area = area,
      _coordinates = coordinates,
      _androidViewMode = androidViewMode,
      _onMapCreated = onMapCreated,
      _autoUpdateSettings = autoUpdateSettings,
      _allowInternetConnection = allowInternetConnection;