Exemple #1
0
        public MapPage()
        {
            InitializeComponent();

            this._vm         = new MapPageViewModel(this.map.Children);
            this.DataContext = this._vm;
        }
Exemple #2
0
        public MapPage()
        {
            InitializeComponent();

            BindingContext = new MapPageViewModel(DependencyService.Get <INavService>());

            _viewModel.Map = MyMap;
        }
        public MapPage()
        {
            InitializeComponent();

            BindingContext = _viewModel = new MapPageViewModel();

            this.map.MoveToRegion(MapSpan.FromCenterAndRadius(new Position(Constants.DEFAULT_LATITUDE, Constants.DEFAULT_LONGITUDE), Distance.FromKilometers(10000.0)));
        }
Exemple #4
0
 public MapPage()
 {
     InitializeComponent();
     BindingContext = mapPageViewModel = new MapPageViewModel();
     ApplyMapTheme();
     InitialyzeSites();
     findBtn = this.FindByName <ImageButton>("find_btn");
     getBtn  = this.FindByName <ImageButton>("get_btn");
 }
Exemple #5
0
 public MapPage()
 {
     InitializeComponent();
     VM                   = BindingContext as MapPageViewModel;
     VM.MyMap             = MyMap;
     this.CurrentLocation = VM.CurrentLocation;
     MyMap.PinClicked    += VM.PinClicked;
     MyMap.Map            = VM.Map;
 }
        public MainPage()
        {
            InitializeComponent();

            BindingContext = mapPageViewModel = new MapPageViewModel();


            //map.MoveToRegion(MapSpan.FromCenterAndRadius(pinTokyo.Position, Distance.FromMeters(5000)));
        }
Exemple #7
0
        protected async override void OnAppearing()
        {
            base.OnAppearing();

            await MoveMapToCurrentPositionAsync();

            MapPageViewModel context = BindingContext as MapPageViewModel;
            await context.LoadData();
        }
Exemple #8
0
 /// <summary>
 /// Creates new instance of <see cref="PushPinService"/>
 /// </summary>
 /// <param name="pushPins">PushPins</param>
 public PushPinService(MapPageViewModel vm)
 {
     // setting fields
     this._vm = vm;
     this._institutionClient = ((App)App.Current).InstitutionClient;
     this._geocodePath       = ConfigurationManager.AppSettings["GeocodePath"];
     this._httpClient        = new HttpClient();
     this._institutions      = new Dictionary <Pushpin, Institution>();
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="T:Locator.Pages.MapPage"/> class.
        /// </summary>
        /// <param name="model">Model.</param>
        public MapPage(MapPageViewModel model)
        {
            _viewModel     = model;
            BindingContext = model;
            InitializeComponent();

            Appearing    += HandleAppearing;
            Disappearing += HandleDisappearing;

            geocoder = new Geocoder();
        }
        public MapPage()
        {
            InitializeComponent();
            BindingContext = new MapPageViewModel();

            DrawRouteCommand     = new Command <List <Xamarin.Forms.GoogleMaps.Position> >(DrawRoute);
            UpdateCommand        = new Command <Xamarin.Forms.GoogleMaps.Position>(Update);
            CenterMapCommand     = new Command <Location>(OnCenterMap);
            CleanPolylineCommand = new Command(CleanPolyline);
            map.UiSettings.ZoomControlsEnabled = false;
            AddMapStyle();
        }
Exemple #11
0
        public MapPage()
        {
            InitializeComponent();

            map.UiSettings.ZoomGesturesEnabled     = true;
            map.UiSettings.MyLocationButtonEnabled = false;
            map.UiSettings.ZoomControlsEnabled     = false;
            StylingMap();

            BindingContext       = new MapPageViewModel();
            MapPageViewModel.map = map;
        }
Exemple #12
0
        private void StartNavigationService(PersonRecord model)
        {
            NavigationService navi = new NavigationService();

            TopicsViewModel  = new TopicsViewModel(navi, model);
            MapPageViewModel = new MapPageViewModel(navi, model);

            TopicsPage = new NavigationPage(new TopicsPage());
            MapPage    = new MapPage();

            navi.Navi        = TopicsPage.Navigation;
            navi.CurrentPage = TopicsPage;
            MainPage         = TopicsPage;
        }
Exemple #13
0
        public MapPage()
        {
            InitializeComponent();

            this.ViewModel = new MapPageViewModel()
            {
                Title = this.Title
            };
            this.BindingContext = this.ViewModel;

            this.MyMap.MapStyle = MapStyle.FromJson(MAP_STYLE);
            this.MyMap.UiSettings.ZoomControlsEnabled     = false;
            this.MyMap.UiSettings.MyLocationButtonEnabled = false;
            this.MyMap.UiSettings.RotateGesturesEnabled   = false;
        }
Exemple #14
0
        public void Setup()
        {
            fixture = new Fixture();
            fixture.Customize(new AutoMoqCustomization());

            map = fixture.Freeze <Mock <IMapPage> >();

            var pins  = new List <Pin>();
            var lines = new List <Polyline>();

            map.Setup(p => p.Pins).Returns(pins);
            map.Setup(p => p.Polylines).Returns(lines);
            model         = fixture.Build <MapPageViewModel>().OmitAutoProperties().Create();
            model.MapPage = map.Object;
        }
Exemple #15
0
 public MainPage()
 {
     InitializeComponent();
     BindingContext = mapPageViewModel = new MapPageViewModel();
 }
 public MainPage()
 {
     BindingContext = viewModel = new MapPageViewModel();
     InitializeComponent();
     ApplyMapTheme();
 }
Exemple #17
0
 public MapsPage(FilterModel filterModel)
 {
     InitializeComponent();
     this.BindingContext = viewModel = new MapPageViewModel(filterModel);
     Init();
 }
Exemple #18
0
 public MapPage(ComicCon con)
 {
     InitializeComponent();
     BindingContext = new MapPageViewModel(con);
 }
 public Maps()
 {
     InitializeComponent();
     BindingContext = mapPageViewModel = new MapPageViewModel();
     ApplyMapTheme();
 }
Exemple #20
0
 public MapPage()
 {
     NavigationPage.SetHasNavigationBar(this, false);
     InitializeComponent();
     BindingContext = new MapPageViewModel(new Navigations());
 }
Exemple #21
0
 public MapPage(Task <List <string> > search, DataManager dataManager, string searchString)
 {
     InitializeComponent();
     BindingContext = new MapPageViewModel(search, Map, dataManager, searchString);
 }
 public MapPage()
 {
     InitializeComponent();
     vm      = new MapPageViewModel();
     Content = vm.Map;
 }