Esempio n. 1
0
        //(CDLTLL) Constructor - DI: Dependencies injected in the Constructor
        public MapViewModel(IVehiclesService injectedVehiclesService)
        {
            //Injected/DI thru constructor
            _vehiclesService = injectedVehiclesService;

            _geolocator = Plugin.Geolocator.CrossGeolocator.Current;

            Title = "Map";

            //(Redmond's location in case the GPS plugin doesn't work)
            VisibleRegion = MapSpan.FromCenterAndRadius(new Position(47.661407, -122.131213), new Distance(3000));
        }
        public RunningPage(string dojotAddr, string user)
        {
            _dojotAddr         = dojotAddr;
            _user              = user;
            gotLocation        = false;
            position           = new Position();
            logLocker          = new object();
            this.Disappearing += WhenClosed;
            this.Appearing    += WhenOpened;

            locator = CrossGeolocator.Current;

            InitializeComponent();
        }