Ejemplo n.º 1
0
        public MapsView(Festival festival, string location, out bool success)
        {
            IMapsUI mapsUi = new MapsUI(_servicekey);

            _geodan   = new Geodan(_servicekey);
            _festival = festival;
            Routes    = new ObservableCollection <RouteData>();
            InitializeComponent();

            MapControl.Map.Layers.Add(mapsUi.CreateWmtsLayer());
            MapControl.Map.Layers.Add(new TileLayer(KnownTileSources.Create())
            {
                Name = "OpenStreetMap"
            });

            // Start view location
            success = GoToLocation(location, true);
        }
Ejemplo n.º 2
0
        public MapsView()
        {
            IMapsUI mapsUi = new MapsUI(_servicekey);

            _geodan   = new Geodan(_servicekey);
            _festival = DBContext.Instance.Festivals.ToList()[0];
            Routes    = new ObservableCollection <RouteData>();
            InitializeComponent();

            MapControl.Map.Layers.Add(mapsUi.CreateWmtsLayer());
            MapControl.Map.Layers.Add(new TileLayer(KnownTileSources.Create())
            {
                Name = "OpenStreetMap"
            });

            // Start view location
            bool success = GoToLocation($"{_festival.City} {_festival.Street} {_festival.HouseNumber}", true);
        }