<commit_before>﻿using BruTile.Web;
using Mapsui.Geometries;
using Mapsui.Layers;
using Mapsui.Providers;
using Mapsui.Samples.Common;
using Mapsui.Styles;
using System.IO;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Navigation;

namespace Mapsui.Samples.Windows8
{
    public sealed partial class MainPage
    {
        public MainPage()
        {
            InitializeComponent();
            mapControl.Viewport.Resolution = 2000;
            mapControl.Viewport.Center = new Point(0, 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));
        }

        private MemoryProvider CreateRandomPointsProvider()
        {
            var randomPoints = PointLayerSample.GenerateRandomPoints(mapControl.Map.Envelope, 200);
            var features = new Features();<commit_msg>W8 sample with only tile layer.<commit_after>﻿using BruTile.Predefined;
using BruTile.Web;
using Mapsui.Geometries;
using Mapsui.Layers;
using Mapsui.Providers;
using Mapsui.Samples.Common;
using Mapsui.Styles;
using System.IO;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Navigation;

namespace Mapsui.Samples.Windows8
{
    public sealed partial class MainPage
    {
        public MainPage()
        {
            InitializeComponent();
            mapControl.Viewport.Resolution = 2000;
            mapControl.Viewport.Center = new Point(0, 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(KnownTileSources.Create()));
            //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));
        }

        private MemoryProvider CreateRandomPointsProvider()
        {
            var randomPoints = PointLayerSample.GenerateRandomPoints(mapControl.Map.Envelope, 200);
            var features = new Features();
{'fraction_non_alphanumeric': 0.09475032010243278, 'fraction_numerical': 0.00736235595390525, 'mean_word_length': 2.774154589371981, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4145701', 'n_tokens_mistral': 862, 'n_tokens_neox': 814, 'n_words': 193}