Skip to content

wemap/wemap-sdk-flutter-webview

Repository files navigation

Getting started

A Flutter plugin to display wemap's livemap.

Installation

  • Create new flutter application
flutter create sample_flutter_wemap_sdk && cd sample_flutter_wemap_sdk
  • Add flutter_wemap_sdk plugin to your pubspec.yaml dependencies:
flutter_wemap_sdk:
    git:
      url: https://github.com/wemap/flutter_wemap_sdk.git
      ref: master

iOS

  • update Podfile
  use_frameworks! :linkage => :static
  use_modular_headers!

  pod 'livemap-ios-sdk', :git => '[email protected]:wemap/livemap-ios-sdk.git', :branch => 'master'
  platform :ios, '11.0'
  • install cd ios/ && pod install

Android

  • add compileSdkVersion 33 to your app's build.gradle (android/app/build.gradle)

Usage

  • instanciate && return Livemap from emmid & token
class MyHomePage extends StatelessWidget {
  final String title;
  const MyHomePage({super.key, required this.title});

  @override
  Widget build(BuildContext context) {
    const Map<String, dynamic> creationParams = <String, dynamic>{
      "token": "GUHTU6TYAWWQHUSR5Z5JZNMXX",
      "emmid": 22418
    };

    return Scaffold(
        appBar: AppBar(title: Text(title)),
        body: Container(
            constraints: const BoxConstraints.expand(),
            child: const Livemap(options: creationParams)));
  }
}
  • use controller & subscribes to event:

see example/

  • events:

    • onMapReady
    • onPinpointOpen
    • onPinpointClose
    • onContentUpdated
    • onIndoorLevelChanged
    • onIndoorLevelsChanged
    • onMapClick
  • methods:

    • openPinpoint
    • closePinpoint
    • setCenter
    • centerTo
    • easeTo
    • setIndoorFeatureState
    • setZoom

Example

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published