/// <summary>
        /// Adds or updates the indoor styles to the map.
        /// </summary>
        /// <returns></returns>
        /// <exception cref="ComponentDisposedException">The component has already been disposed</exception>
        public async ValueTask InitializeAsync()
        {
            _logger.LogAzureMapsControlInfo(AzureMapLogEvent.IndoorManager_InitializeAsync, "IndoorManager - InitializeAsync");
            _logger.LogAzureMapsControlDebug(AzureMapLogEvent.IndoorManager_InitializeAsync, "Id", Id);

            EnsureNotDisposed();

            await _jsRuntime.InvokeVoidAsync(Constants.JsConstants.Methods.Indoor.Initialize.ToIndoorNamespace(), Id);
        }
Example #2
0
        public async ValueTask <IndoorManager> CreateIndoorManagerAsync(IndoorManagerOptions options, IndoorManagerEventActivationFlags eventFlags)
        {
            _logger.LogAzureMapsControlInfo(AzureMapLogEvent.IndoorService_CreateIndoorManagerAsync, "IndoorService - CreateIndoorManagerAsync");
            _logger.LogAzureMapsControlDebug(AzureMapLogEvent.IndoorService_CreateIndoorManagerAsync, "Options", options);
            _logger.LogAzureMapsControlDebug(AzureMapLogEvent.IndoorService_CreateIndoorManagerAsync, "EventFlags", eventFlags);

            var indoorManager = new IndoorManager(_jsRuntime, _logger);
            await _jsRuntime.InvokeVoidAsync(Constants.JsConstants.Methods.Indoor.CreateIndoorManager.ToIndoorNamespace(), indoorManager.Id, options, eventFlags?.EnabledEvents, DotNetObjectReference.Create(indoorManager.EventHelper));

            return(indoorManager);
        }
Example #3
0
        /// <summary>
        /// Disposes the animation
        /// </summary>
        /// <returns></returns>
        public virtual async ValueTask DisposeAsync()
        {
            EnsureNotDisposed();
            await JsRuntime.InvokeVoidAsync(Constants.JsConstants.Methods.Animation.Dispose.ToAnimationNamespace(), Id);

            Disposed = true;
        }
        public async ValueTask <IMoveAlongPathAnimation> MoveAlongPathAsync(LineString path, DataSource pathSource, Point pin, DataSource pinSource, MoveAlongPathAnimationOptions options = default)
        {
            _logger?.LogAzureMapsControlInfo(AzureMapLogEvent.AnimationService_MoveAlongPath, "Calling MoveAlongPath");

            Require.NotNull(path, nameof(path));
            Require.NotNull(pathSource, nameof(pathSource));
            Require.NotNull(pin, nameof(pin));
            Require.NotNull(pinSource, nameof(pinSource));

            _logger?.LogAzureMapsControlDebug(AzureMapLogEvent.AnimationService_MoveAlongPath, "PathId", path.Id);
            _logger?.LogAzureMapsControlDebug(AzureMapLogEvent.AnimationService_MoveAlongPath, "pathSource", pathSource.Id);
            _logger?.LogAzureMapsControlDebug(AzureMapLogEvent.AnimationService_MoveAlongPath, "PinId", pin.Id);
            _logger?.LogAzureMapsControlDebug(AzureMapLogEvent.AnimationService_MoveAlongPath, "PinSourceId", pinSource.Id);
            _logger?.LogAzureMapsControlDebug(AzureMapLogEvent.AnimationService_MoveAlongPath, "Options", options);

            var animation = new MoveAlongPathAnimation(Guid.NewGuid().ToString(), _jsRuntime);
            await _jsRuntime.InvokeVoidAsync(Constants.JsConstants.Methods.Animation.MoveAlongPath.ToAnimationNamespace(), animation.Id, path.Id, pathSource.Id, pin.Id, pinSource.Id, options);

            animation.Disposed = options.DisposeOnComplete.GetValueOrDefault();
            return(animation);
        }