Пример #1
0
        public void TestMapViewTrackMethods()
        {
            // set up
            var mapView = new MapView.MapView();
            var track   = UnitTestHelper.GetDefaultTrack();

            // run
            mapView.AddTrack(track);
            ////mapView.SampleTrackHeights(track);
            mapView.ZoomToTrack(track);
            mapView.RemoveTrack(track);
            mapView.ClearAllTracks();
        }
Пример #2
0
        public void TestMapViewLayerMethods()
        {
            // set up
            var mapView = new MapView.MapView();
            var layer   = DataServiceHelper.GetInitialLayerList().First();

            // run
            mapView.AddLayer(layer);
            mapView.SetLayerVisibility(layer);
            ////mapView.ExportLayerAsync(layer);
            mapView.ZoomToLayer(layer);
            mapView.RemoveLayer(layer);
            mapView.ClearLayerList();
        }
Пример #3
0
        public async Task TestMapViewCreate()
        {
            // set up
            var mapView = new MapView.MapView();

            // run
            await mapView.CreateAsync(
                Constants.InitialCenterPoint,
                5000,
                true);

            // check
            Assert.IsTrue(
                mapView.MapInitializedTask.IsCompleted,
                "map initialized task must be completed");
        }
Пример #4
0
        public void TestMapViewLocationMethods()
        {
            // set up
            var mapView      = new MapView.MapView();
            var locationList = DataServiceHelper.GetDefaultLocationList();

            // run
            mapView.AddLocationList(locationList);

            var location = locationList.First();

            mapView.UpdateLocation(location);
            mapView.ZoomToLocation(location.MapLocation);
            mapView.RemoveLocation(location.Id);

            mapView.ClearLocationList();
        }
Пример #5
0
        public void TestMapViewSettings()
        {
            // set up
            var mapView = new MapView.MapView();

            Assert.IsTrue(mapView.UseEntityClustering, "initial settings value must be correct");

            // run
            mapView.MapImageryType      = MapImageryType.BingMapsAerialWithLabels;
            mapView.MapOverlayType      = MapOverlayType.ContourLines;
            mapView.MapShadingMode      = MapShadingMode.Fixed10Am;
            mapView.UseEntityClustering = false;

            // check
            Assert.AreEqual(MapShadingMode.Fixed10Am, mapView.MapShadingMode, "settings value must be correct");
            Assert.AreEqual(MapOverlayType.ContourLines, mapView.MapOverlayType, "settings value must be correct");
            Assert.AreEqual(MapImageryType.BingMapsAerialWithLabels, mapView.MapImageryType, "settings value must be correct");
            Assert.IsFalse(mapView.UseEntityClustering, "settings value must be correct");
        }