MapViewController constructor
MapViewController({
- String? situmUser,
- required MapViewConfiguration mapViewConfiguration,
Implementation
MapViewController({
String? situmUser,
required MapViewConfiguration mapViewConfiguration,
}) {
_viewerDomain = mapViewConfiguration.viewerDomain;
// Open SDK channel to call native (private) methods if necessary.
// WARNING: don't set the method call handler here as it will overwrite the
// one provided by the SDK controller.
methodChannel = const MethodChannel(situmSdkChannelId);
var situmSdk = SitumSdk();
// Be sure to initialize, configure and authenticate in our SDK
// so it can be used in callbacks, etc.
situmSdk.init();
situmSdk.setApiKey(mapViewConfiguration.situmApiKey);
// Subscribe to native SDK messages so the location updates can be directly
// forwarded to the map viewer.
situmSdk.internalSetMethodCallMapDelegate(_methodCallHandler);
_validateMapViewProjectSettings();
}