Ejemplo n.º 1
0
        public Positioner CreatePositioner(PositionerOptions positionerOptions)
        {
            var createParamsInterop = new PositionerCreateParamsInterop
            {
                ElevationMode    = positionerOptions.GetElevationMode(),
                LatitudeDegrees  = positionerOptions.GetLatitudeDegrees(),
                LongitudeDegrees = positionerOptions.GetLongitudeDegrees(),
                Elevation        = positionerOptions.GetElevation(),
                IndoorMapId      = positionerOptions.GetIndoorMapId(),
                IndoorMapFloorId = positionerOptions.GetIndoorMapFloorId(),
                UsingFloorId     = positionerOptions.IsUsingFloorId()
            };

            var positionerId = NativePositionerApi_CreatePositioner(NativePluginRunner.API, ref createParamsInterop);

            var positioner = new Positioner(
                this,
                positionerId,
                positionerOptions.GetElevationMode());

            m_positionerIdToObject.Add(positionerId, positioner);

            NotifyPositionerProjectionsChanged();

            return(positioner);
        }
Ejemplo n.º 2
0
        public Positioner CreatePositioner(PositionerOptions positionerOptions)
        {
            var createParamsInterop = new PositionerCreateParamsInterop
            {
                ElevationMode    = positionerOptions.GetElevationMode(),
                LatitudeDegrees  = positionerOptions.GetLatitudeDegrees(),
                LongitudeDegrees = positionerOptions.GetLongitudeDegrees(),
                Elevation        = positionerOptions.GetElevation(),
                IndoorMapId      = positionerOptions.GetIndoorMapId(),
                IndoorMapFloorId = positionerOptions.GetIndoorMapFloorId(),
                UsingFloorId     = positionerOptions.IsUsingFloorId()
            };

            var positionerId = NativePositionerApi_CreatePositioner(NativePluginRunner.API, ref createParamsInterop);

            var positioner = new Positioner(
                this,
                positionerId,
                positionerOptions.IsUsingFloorId());

            m_positionerIdToObject.Add(positionerId, positioner);

            DoubleVector3 positionerECEFLocation;

            if (TryFetchECEFLocationForPositioner(positioner.Id, out positionerECEFLocation))
            {
                positioner.SetECEFLocation(positionerECEFLocation);
            }

            return(positioner);
        }