User Tools

Site Tools


map_suite_desktop_for_wpf_layers_featuresources_samples

Wpf Samples

Nautical Charts Viewer Sample for Wpf

ThinkGeo Nautical Charts is a standalone Nuget Package which works with ThinkGeo 10.X Desktop/Web products. It reads and displays S-57 Electronic Navigational Charts(ENC) from International Hydrographic Organization(IHO), it also reads the style info defined in an S-52 file.

This sample happens to be written for WPF but the Nautical Charts Package works for Web project as well. Download and open it in Visual Studio, hit F5 and Bang, you are good to go. After you have the charts viewer running, use File → Open to load an S-57 data, (it can be downloaded from NOAA’s website), the nautical charts will then appear on the map (it generates an index file the first time the data is loaded).

ThinkGeo uses a default style which can be easily modified. Nautical Charts Viewer provide the ability to switch the map between 5 modes: Day Bright, Day Black, Day White, Dusk and Night. It has 3 verbose mode of “All”, “Standard” and “Base”. It can switch boundaries between dashed line and triangles, it can show/hide different labeling, show different languages, etc. If you are a developer, dig in the code and you can see it’s as simple as creating a layer and set up the properties like following, and it can do more than it shows in this sample

Screenshot

View this sample on Github

Display Iso Lines Sample for Wpf

In this sample we show how you can use Map Suite to add isolines (commonly known as contour lines) to your .NET application. Isolines are a way to visualize breaks between different groups of data such as elevation levels, soil properties, or just about anything else you can imagine. This sample also shows the various steps in creating isolines, including the gathering of point data, creating a grid using interpolation, and finally, picking your isoline break levels. We also quickly dive into some more advanced options such as generating isolines on the fly.

To bring this all together, check out our [instructional video](https://www.youtube.com/watch?v=eejtCTftpzo) that will walk you through the process of setting up and working with isolines in Map Suite.

Please note that you will need version 5.0.87.0 or newer of Map Suite in order to use isolines. For more information on how to upgrade, see the [Map Suite Daily Builds Guide](http://wiki.thinkgeo.com/wiki/map_suite_daily_builds_guide).

From 6.0.187.0, the sample has been updated that polygons can also be returned as IsoLines results. You need version 6.0.187.0 or newer of Map Suite in order to use this sample.

Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_wpf) for the details.

Screenshot

View this sample on Github

In this Wpf project, we explore more capabilities of the PopupOverlay and its collection of Popups. With the Content property, we can add a TextBox or any other control to a Popup. For example, here we show how to have the column value of a selected feature appear in a Popup on the user MapClick event. Notice how that column value can be easily changed by typing in the TextBox of the Popup and committing the edit.

Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_wpf) for the details.

Screenshot

View this sample on Github

Color Replacement Sample for Wpf

In today’s WPF project, we show you how to replace a specific color in a raster image, with the advantage of new added API Color Mapping. For the example, in this project, the lake in Green can be replaced with blue.

Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_wpf) for the details.

Screenshot

View this sample on Github

NOAA Globel Weather Station Layer Sample for Wpf

This WPF project, demonstrates how to query and display real time NOAA weather station data directly as a Layer, which allows you to display up-to-date weather station data from around the world on top of your maps. The weather station data is sourced from NOAA and is refreshed every 15 minutes in the background. As these classes are inherited from the FeatureSource and FeatureLayer, many properties are querable and can be used to create a variety of maps or analysis of current weather patterns. This feature can be applied in all Map Suite products.

Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_wpf) for the details.

Screenshot

View this sample on Github

Magnetic Declination Sample for Wpf

In today's WPF project, we show you how to add the Magnetic Declination or Magnetic variation to the map, it's designed as an AdormentLayer, which is used for showing the angle on the horizontal plane between magnetic north (the direction in which the north end of a compass needle, corresponding to the direction of the Earth's magnetic field lines) and true north (the direction along a meridian towards the geographic North Pole). This angle varies depending on one's position on the Earth's surface, and over time. See

Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_wpf) for the details.

Screenshot

View this sample on Github

Combine Overlay Sample for Wpf

In today’s Wpf project, we show a technique of using a common FeatureSource for two different Overlays. From a physical shapefile representing cities, a regular LayerOverlay is used for the higher zoom levels while a FeatureSourceMarkerOverlay is used for the lower zoom levels. FeatureSourceMarkerOverlay is a Wpf specific overlay offering features for a better user experience such a Tooltips and ImageSource.

Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_wpf) for the details.

Screenshot

View this sample on Github

Edit Attribute Of Shapefile Sample for Wpf

The purpose of this Wpf sample is to show how to edit the attributes of a feature of a shapefile. This sample is useful for anyone wanting to actualize the attributes part of its data by simply clicking on the desired feature on the map and updating its attributes in a textbox. You will find the editing part of the code in the KeyDown event of the textbox.

Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_wpf) for the details.

Screenshot

View this sample on Github

Delay Drawing Sample for Wpf

This WPF project shows how to use the Delay Map Drawing feature to control whether or not the layer is redrawn after a specified delay. This option is very helpful for anyone wanting to do something before actually refreshing the map - such as editing the elements, adding an animation, etc.

Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_wpf) for the details.

Screenshot

View this sample on Github

Save Load State Sample for Wpf

The purpose of this Wpf project is to show how to use the new SaveState and LoadState of the SimpleMarkerOverlay. We show how you can simply drag the icons to change their location, save their state to a file and then reload the state from that file. For this sample to work, you will need to use the latest

Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_wpf) for the details.

Screenshot

View this sample on Github

Highlight At Mouse Hover Sample for Wpf

In this WPF project, we show you how to highlight a feature when the user hovers the mouse pointer over it. This effect can be realized in Map Suite by using a timer and doing some spatial querying based on the location of the mouse pointer. This sample works with area-based features but the same could be accomplished with point- or line-based features simply by using different spatial queries.

Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_wpf) for the details.

Screenshot

View this sample on Github

GPS Exchange Format Feature Layer Sample for Wpf

This sample demonstrates how to read GPS EXchange Format file(*.gpx) with Map Suite. GPX (GPS Exchange Format) is a light-weight XML data format for the interchange of GPS data (waypoints, routes, and tracks) between applications and Web services on the Internet, which you can find more information:here. Now Map Suite supports the GPX 1.0 and 1.1 schema. This sample works with Map Suite development branch daily build 7.0.275.0 or later.

Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_wpf) for the details.

Screenshot

View this sample on Github

Dynamic Marker Overlay Sample for Wpf

In today’s WPF project, we show you how to retrieve data from a REST service and display them as markers with different styles based on its attributes. You can click on any marker to call a WCF service which returns data from the server. A popup displays a chart with information. All the markers and related information are updated dynamically after a specific time interval.

Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_wpf) for the details.

Screenshot

View this sample on Github

Styles With Inmemory Feature Layer Sample for Wpf

In this WPF project, we show how to build an InMemoryFeatureLayer from a text file. You'll notice how the columns are set up so that styles can be used as if the InMemoryFeatureLayer were a static layer such as a Shapefile. Here, we apply a Class Breask Style and a Text Style to our InMemoryFeatureLayer. What we learn in this sample can be applied to all the different editions of Map Suite.

Please refer to [Wiki](http://wiki.thinkgeo.com/wiki/map_suite_desktop_for_wpf) for the details.

Screenshot

View this sample on Github

map_suite_desktop_for_wpf_layers_featuresources_samples.txt · Last modified: 2020/03/08 06:40 (external edit)