ThinkGeo.com    |     Documentation    |     Premium Support

World Bathymetry offline map

Hello there,

I would like to use offline map like the World Bathymetry (https://thinkgeo.com/image-blog/blog-post-title-four-hjyn6) for WPF desktop application on version 9.0.

Could it be possible?

Sincerely,

Aleksandr

Thanks Alexander,
Yes. It is possible. You can get the WPF sample from product center.

Here is the main code you could use.

 private void WpfMap_Loaded(object sender, RoutedEventArgs e)
        {
            wpfMap1.MapUnit = GeographyUnit.DecimalDegree;
            wpfMap1.CurrentExtent = new RectangleShape(-155.733, 95.60, 104.42, -81.9);
            LayerOverlay worldOverlay = new LayerOverlay();
            worldOverlay.Layers.Add(new BackgroundLayer(new GeoSolidBrush(GeoColor.GeographicColors.ShallowOcean)));

            ShapeFileFeatureLayer placeCityLayer =
            new ShapeFileFeatureLayer(@"E:\Tickets\MARINE SOFTWARE SOLUTION SIA\Bathymetry\ne_10m_bathymetry_200.shp");
            placeCityLayer.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.CreateSimpleLineStyle(GeoColor.StandardColors.Gray, 1, true);
            placeCityLayer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = new PointStyle(PointSymbolType.Circle, GeoBrushes.White, new GeoPen(GeoColors.Black, 2), 7);
            placeCityLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = new AreaStyle(new GeoPen(GeoColors.Black, 2), GeoBrushes.White);
            placeCityLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;

            placeCityLayer.FeatureSource.Projection = new Proj4Projection(3857, 4326);

            worldOverlay.Layers.Add("PlaceCity", placeCityLayer);
            wpfMap1.Overlays.Add("WMK", worldOverlay);
            wpfMap1.Refresh();
        }

Here is the result.

Thanks

Frank