/// <summary>
        /// Initialise the map
        /// </summary>
        public override void InitMap()
        {
            MapControlManager.InitMap(22f, true);
            // display all seekios on the map
            foreach (var seekios in App.CurrentUserEnvironment.LsSeekios)
            {
                if (seekios != null && seekios.LastKnownLocation_dateLocationCreation.HasValue &&
                    (seekios.LastKnownLocation_latitude != App.DefaultLatitude &&
                     seekios.LastKnownLocation_longitude != App.DefaultLongitude))
                {
                    var mode       = App.CurrentUserEnvironment.LsMode.FirstOrDefault(el => el.Seekios_idseekios == seekios.Idseekios);
                    var isDontMove = mode != null && mode.ModeDefinition_idmodeDefinition == (int)ModeDefinitionEnum.ModeDontMove;

                    MapControlManager.CreateSeekiosMarkerAsync(seekios.Idseekios.ToString()
                                                               , seekios.SeekiosName
                                                               , seekios.SeekiosPicture
                                                               , seekios.LastKnownLocation_dateLocationCreation.Value
                                                               , seekios.LastKnownLocation_latitude
                                                               , seekios.LastKnownLocation_longitude
                                                               , seekios.LastKnownLocation_accuracy
                                                               , isDontMove);
                }
            }
            MapControlManager.SeekiosMarkerClicked += OnSeekiosMarkerClicked;
        }
Beispiel #2
0
        /// <summary>
        /// Initialize the map with markers
        /// </summary>
        public virtual void InitMap()
        {
            MapControlManager.InitMap(22f, true);
            var seekios    = MapViewModelBase.Seekios;
            var isDontMove = MapViewModelBase.Mode != null && MapViewModelBase.Mode.ModeDefinition_idmodeDefinition == (int)ModeDefinitionEnum.ModeDontMove;

            if (seekios != null && seekios.LastKnownLocation_dateLocationCreation.HasValue)
            {
                MapControlManager.CreateSeekiosMarkerAsync(seekios.Idseekios.ToString()
                                                           , seekios.SeekiosName
                                                           , seekios.SeekiosPicture
                                                           , seekios.LastKnownLocation_dateLocationCreation.Value
                                                           , seekios.LastKnownLocation_latitude
                                                           , seekios.LastKnownLocation_longitude
                                                           , seekios.LastKnownLocation_accuracy
                                                           , isDontMove);
                MapControlManager.CenterInLocalisation(seekios.LastKnownLocation_latitude, seekios.LastKnownLocation_longitude, (float)ZoomLevelEnum.MediumZoom);
            }
        }
        /// <summary>
        /// Initialize the map with markers
        /// </summary>
        public virtual void InitMap()
        {
            MapControlManager.InitMap((float)ZoomLevelEnum.MediumZoom, true);

            if (Seekios != null && Seekios.LastKnownLocation_dateLocationCreation.HasValue)
            {
                var isDontMove = Mode != null && Mode.ModeDefinition_idmodeDefinition == (int)ModeDefinitionEnum.ModeDontMove;
                var isInAlert  = Mode != null && Mode.StatusDefinition_idstatusDefinition != 1;
                if (Seekios.LastKnownLocation_accuracy >= 0 && Seekios.LastKnownLocation_accuracy <= 10)
                {
                    Seekios.LastKnownLocation_accuracy = 0;
                }
                MapControlManager.CreateSeekiosMarkerAsync(Seekios.Idseekios.ToString()
                                                           , Seekios.SeekiosName
                                                           , Seekios.SeekiosPicture
                                                           , Seekios.LastKnownLocation_dateLocationCreation.Value
                                                           , Seekios.LastKnownLocation_latitude
                                                           , Seekios.LastKnownLocation_longitude
                                                           , Seekios.LastKnownLocation_accuracy
                                                           , isDontMove
                                                           , isInAlert);
            }
        }