private void Button_Click(object sender, RoutedEventArgs e)
        {
            ShapefileLayer areaLayer = Map1.FindLayer <ShapefileLayer>("countries-900913");

            areaLayer.UseRandomStyle(120);
            Map1.Refresh("AreaOverlay");
        }
示例#2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            ShapefileLayer pointLayer = Map1.FindLayer <ShapefileLayer>("cities-900913");

            pointLayer.UseRandomStyle(120);

            SyncSymbolSettings(pointLayer);
        }
示例#3
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            ShapefileLayer lineLayer = Map1.FindLayer <ShapefileLayer>("streets-900913");

            float[] dashPattern = ((LineStyle)lineLayer.Styles[0]).Pen.DashPattern;
            lineLayer.UseRandomStyle();
            ((LineStyle)lineLayer.Styles[0]).Pen.DashPattern = dashPattern;

            Map1.Refresh("LineOverlay");
        }
        private void Map1_Loaded(object sender, RoutedEventArgs e)
        {
            Map1.MapUnit = GeoUnit.Meter;

            Map1.UseOpenStreetMapAsBaseMap();

            ShapefileLayer shapefileLayer = new ShapefileLayer("AppData/countries-900913.shp");

            shapefileLayer.UseRandomStyle(120);
            Map1.AddStaticLayers("Dynamic Layers", shapefileLayer);

            Map1.ZoomToFullBound();
        }
        public Form1()
        {
            InitializeComponent();

            Map1.MapUnit = GeoUnit.Meter;
            Map1.UseOpenStreetMapAsBaseMap();

            ShapefileLayer shapefileLayer = new ShapefileLayer("AppData/countries-900913.shp");

            shapefileLayer.UseRandomStyle(120);
            Map1.AddStaticLayers("Dynamic Layers", shapefileLayer);

            Map1.ZoomToFullBound();
        }