Exemplo n.º 1
0
        private void OnDemo1ButtonClicked(object sender, RoutedEventArgs e)
        {
            var provider = CreateRandomPointsProvider();

            mapControl.Map.Layers.Add(PointLayerSample.CreateRandomPointLayerWithLabel(provider));
            mapControl.Refresh();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Invoked when this page is about to be displayed in a Frame.
        /// </summary>
        /// <param name="e">Event data that describes how this page was reached.  The Parameter
        /// property is typically used to configure the page.</param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            mapControl.Map.Layers.Add(new TileLayer(new OsmTileSource()));
            var provider = CreateRandomPointsProvider();

            mapControl.Map.Layers.Add(PointLayerSample.CreateRandomPointLayerWithLabel(provider));
            mapControl.Map.Layers.Add(PointLayerSample.CreateStackedLabelLayer(provider));
            mapControl.Map.Layers.Add(PointLayerSample.CreateRandomPolygonLayer(mapControl.Map.Envelope, 1));
        }
Exemplo n.º 3
0
        private static Map CreateMap()
        {
            var bitmapData = System.Reflection.Assembly.GetExecutingAssembly()
                             .GetManifestResourceStream("Mapsui.Samples.Silverlight.UI.Images.btnBbox.png");

            var osmLayer = new TileLayer(new OsmTileSource())
            {
                LayerName = "OSM"
            };
            var provider = CreateRandomPointsProvider(osmLayer.Envelope);

            var map = new Map();

            map.Layers.Add(osmLayer);
            // map.Layers.Add(CreateRandomPointLayer(provider, bitmapData));
            map.Layers.Add(new RasterizingLayer(PointLayerSample.CreateRandomPointLayerWithLabel(provider)));
            return(map);
        }