User Tools

Site Tools


map_suite_all_samples

Table of Contents

Map Suite All Samples


Learn about all the capabilities of Map Suite for Android by browsing all of our samples on GitLab


Learn about all the capabilities of Map Suite for iOS by browsing all of our samples on GitLab


Quickstart Sample for WinForms

The Winforms QuickStart Guide will guide you through the process of creating a sample application and will help you become familiar with Map Suite. This QuickStart Guide supports Map Suite 10.0.0.0 and higher and will show you how to create a Winforms application.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Display Cad File Sample for WinForms

This sample demonstrates how you can read data from an CAD file(*.dwg, *.dxf) in your Map Suite GIS applications, and how to render it with CAD embedded style as well as a customized style. This Cad File support would work in all of the Map Suite controls such as Wpf, Web, MVC and WebApi.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Routing Sample for WinForms

Sample Data Download

The Map Suite Routing “How Do I?” solution offers a series of useful how-to examples for using the Map Suite Routing extension. The bundled solution comes with a small set of routable street data from Austin, TX and demonstrates simple routing, avoiding specific areas, getting turn-by-turn directions, optimizing for the Traveling Salesman Problem, and much more. Full source code is included in both C# and VB.NET languages; simply select your preferred language to download the associated solution.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Open Street Map Sample for WinForms

OpenStreetMap (OSM) is a collaborative project to create free geographic data for the entire world. It can be thought of as a “Free Wiki World Map”. The latest version of MapSuite now supports this.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Use Wpf Map Control Sample for WinForms

The wpf map control supports multi-thread to render map, so it performs better than winforms map control. This sample demonstrates how you can use wpf map control in your winforms applications.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Building 3D Style Sample for WinForms

This project shows to create simulated 3D buildings with WinForms Map control and shapefile.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

World Streets Layer SDK On Windows for WinForms

The World Streets Vector Layer Explorer is a tool that enables you to view the SQLite World Streets data using Map Suite WinForms and provides complete performance metrics.

This project requires a full or evaluation version of Map Suite WinForms Edition.

This sample passed on Linux with Mono Runtime. On Windows platform, it is required to replace the ThinkGeo.MapSuite.Layers.SqliteForLinux with ThinkGeo.MapSuite.Layers.Sqlite package.

To run the sample, please unzip the database file at WorldStreetsLayerSample/App_Data/DallasCounty-3857-20170218.zip, and change the connection string in WorldStreetsLayerSample/App.config to connect database that you extracted to.

Working…

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

ThinkGeo Cloud Vector Maps Sample for Winforms

This sample demonstrates how you can draw the map with Vector Tiles requested from ThinkGeo Cloud Services in your Map Suite GIS applications, with any style you want from StyleJSON (Mapping Definition Grammar). It will show you how to use the XyzFileBitmapTileCache and XyzFileVectorTileCache to improve the performance of map rendering. It supports have 3 built-in default map styles and more awasome styles from StyleJSON file you passed in, by 'Custom': - Light - Dark - TransparentBackground - Custom

ThinkGeo Cloud Vector Maps support would work in all of the Map Suite controls such as Wpf, Web, MVC, WebApi, Android and iOS.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Routing Data Explorer Sample for Wpf

This is a simple routing data viewer sample viewer which demonstrates how to use the RoutingEngine to get the shortest or fastest route in your Map Suite GIS applications.

How to use this tool:

1. Load rtg data:  Click menu “File→Load” browse to a rtg file. You also require a shapefile for the routing source file in the same folder, otherwise it display message “Could not find shp file in the same folder where you seleted”. 2. Start routing:

Use left click for a start point and right click for an end point. If there is no route within **200** meters(you can modify this in source code), the explorer displays a message "There’s no road within 200 meters to where you clicked on".   

This RoutingEngine supports routing in all of the Map Suite controls such as WinForms, Web, MVC and WebApi.

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

Screenshot

View this sample on Github

Rendering Points Performance Test Sample for WinForms

1. In Map Suite, a shape (a shape object inherited from the BaseShape class such as PointShape, LineShape, etc) is heavier than a feature. You can treat a feature as a holder of a byte array (Well Known Binary), it’s lightweight and doesn’t have too many methods to manipulate its core data (Well Known Binary). Shape, however, is heavy, it provides all the info as well as methods against the data. You can cast from a feature to a shape and vice versa.

1. To update a feature, usually, we need to convert a feature to a shape, update the shape and then convert it back to a feature. This will create a new shape and a new feature, which is more straightforward but the cost is high. Below is a method updating a point feature by adding 1 to its X and Y.

       private void UpdateFeatureThroughShape(Feature feature)
        {
            byte[] wkb = feature.GetWellKnownBinary();
            PointShape pointShape = new PointShape(wkb);
            pointShape.X += 1;
            pointShape.Y += 1;
            feature = pointShape.GetFeature();
        }

3. You can update a feature by directly updating its WKB. The following method updates a point feature by adding 1 to its X and Y. It’s the most efficient way where we manipulate a byte array without creating any new object. It is not straightforward and you need to have a deep understanding of the format of WKB. That’s what we are doing in this sample. We will add more APIs to Feature to make it straightforward and efficient.

       private void UpdateFeatureThroughWKB(Feature feature)
        {
            byte[] wkb = feature.GetWellKnownBinary();
            double x = BitConverter.ToDouble(wkb, 5);
            double y = BitConverter.ToDouble(wkb, 13);
            BitConverter.GetBytes(x + 1).CopyTo(wkb, 5);
            BitConverter.GetBytes(y + 1).CopyTo(wkb, 13);
            feature.SetWellKnownBinary(wkb);
        }

4. The “Grid size in Pixel” textbox let you set the size of the grid in which up to one point can be displayed, the bigger the grid is, the more sparse the points will be. This is an optimization with which we can avoid showing too many points on the map. Play with it and you can see the performance differences.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Hello World Sample for WinForms

This sample shows you how to get started building your first application with the Map Suite Desktop for WinForms 10.0.0.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Line Style With Increment Sample for WinForms

In this WinForms desktop project, we show how to create a custom LineStyle for showing distance increment at a regular interval (every tenth kilometer). Having this LineStyle can be very handy when dealing with line networks, such as roads or railways.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Overlays Sample for WinForms

Discover how to use Overlays to build up your map, or to add existing basemaps to your application. The sample can show the following four basemaps:

1. Google Maps
2. Bing Maps
3. World Kit Maps
4. Open street Maps

It can display different styles of maps by setting the map type.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

World Streets Layer SDK On Linux for WinForms

The World Streets Vector Layer Explorer is a tool that enables you to view the SQLite World Streets data using Map Suite WinForms and provides complete performance metrics.

This project requires a full or evaluation version of Map Suite WinForms Edition.

This sample passed on Linux with Mono Runtime. On Windows platform, it is required to replace the ThinkGeo.MapSuite.Layers.SqliteForLinux with ThinkGeo.MapSuite.Layers.Sqlite package.

To run the sample, please unzip the database file at WorldStreetsLayerSample/App_Data/DallasCounty-3857-20170218.zip, and change the connection string in WorldStreetsLayerSample/App.config to connect database that you extracted to.

Working…

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Edit Grid Layer Sample for WinForms

This WinForms project demonstrates how you can update a grid shape file using a spatial query. The elements in the file are rendered using ClassBreakStyles, and change when the values of the Features are incremented.

We have dramatically improved the performance for GridFeatureLayer on MapSuite10.0. The performance compare is as below:

Feature Count                             Version   Times(ms)    
——————————————— ————- —————–
1164800                                       Old           13105            
1164800                           New           3735           
11680 Old 188
11680 New 175

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Display Wms Raster Layer Sample for WinForms

This sample demonstrates how you use WmsRasterLayer to render wms server in your Map Suite GIS applications. This WmsRasterLayer support would work in all of the Map Suite controls such as Wpf, Web, MVC and WebApi.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Stream Loading For Native Image Sample for WinForms

As an alternative to loading an Image with the image file from the file system, you can choose to pass your own stream. This project shows you how to use the event StreamLoading of GdiPlusRasterSource for this purpose. In this project, we show how to do this using a Tiff image but you can also use that event for ShapeFileFeatureSource as we show in a previous project “Shapefile Encryption”. Keep in mind that this technique only works with images besides MrSid, ECW and Jpeg2000. These types of images do not work because the providers do not support streams in their decoding SDKs.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Here Real Time Traffic Sample for WinForms

This sample demonstrates how you use HERE Real-time Traffic to render map in your Map Suite GIS applications. Before running this sample, you need to config “AppId” and “AppCode” in App.Config. If you have ESRI or Here developer account, you can generate them on Here's official Web Site.

HERE Real-time Traffic provides the closest thing to a live depiction of the road. It identifies where, when and why traffic congestion occurs, and delivers up-to-the-minute information on the road conditions and incidents that could set a driver back.

This HereRealTimeTrafficLayer is supported in all of the Map Suite controls such as WPF, Web, MVC and WebAPI.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Detect Gps Sample for WinForms

Upon request of our users, today we publish a project that is the Desktop version of “Detect GPS” for Web. Notice how we use ValueStyle and change the column value of the feature based on the Spatial Query feature at each new position. We chose this structure so that you can have more flexibility for adding more than one moving vehicle features to the InMemoryFeatureLayer. For that, you can pretty much keep the same code and just add an outer loop for looping thru all the moving features.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Custom Track Polygon Sample for WinForms

Learn how to extend the TrackInteractiveOverlay to add behaviors, like deleting the last added vertex when right-clicking the track line.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

US Demographic Map Sample for WinForms

The Demographic and Lifestyle sample template gives you a head start on your statistics project, which includes details about race, age, gender, land usage, and more for all the states in U.S. The template contains pre-styled layers that can be used as-is, or as the foundation for adding your own map notes and layers.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Drag Icon Sample for WinForms

In today’s sample, we show how to drag icons representing vehicle on the map. This is a handy feature if you want to give your users the ability to drag and drop some non stationary features such as vehicles. You can see that to accomplish this functionality, you can use EditInteractiveOverlay as it already has all the necessary logic for dragging purposes. Look at the code to see how to set up that overlay to have the expected behavior.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Snap To Layer Sample for WinForms

This project shows how you can apply snapping to an EditInteractiveOverlay. There are many aspects to snapping. Previously, we showed a project with the mouse pointer snapping to the closest vertex of an editable polygon. Today, we show the technique to drag a control point and have it snap to the closest vertex of a layer if within tolerance. The tolerance can be set in world (meter, feet etc) or screen (pixels) coordinates. Notice that we are also using the technique showed in the previous project “Dragged Point Style”.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Track Overlay With Esc Sample for WinForms

This project shows how to implement aborting a trackshape with Esc key as you could do it in MapSuite 2.x.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Shapefile Encryption Sample for WinForms

In today’s project, we are looking at a way to encrypt shapefiles to prevent them from being used outside the application. We show how to encrypt and decrypt shapefiles using streams. You will see that a very simple encryption algorithm is used but by looking at the example, you will be able to implement your own.

Disclaimer: This encryption system can be used only on small shapefiles due to the amount of memory used. A typical use would be to encrypt some valuable small shapefiles you don't want your users to access. In the future, Map Suite will provide a full encryption system as an API.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Get Zoom Level Sample for WinForms

This example demonstrates how to get the zoom level of the map each time we change its extent. Using custom zoom levels, you will see how to get the zoom level with its characteristics such as the upper and lower scale defining it. You can read the comments inside the project to better understand the relationship of scales with zoom levels.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Snapping To Vertex Sample for WinForms

This project is the first one of a series that will be dedicated to snapping using InteractiveOverlay. In this project, we show how to snap the mouse pointer to the closest vertex of an editable polygon if it is within a set tolerance. The tolerance is shown as a circle around the vertices. This technique can also be applied to snapping vertices within the same shape, between different shapes or even based on a layer. Those different types of snapping will be the subject of future projects related to snapping using InteractiveOverlay.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Edit Rectangles Sample for WinForms

This sample shows how to extend the EditInteractiveOverlay rectangles as shapes, rather than polygon shapes, by setting special column values. For features (both *Well Known Text* and *Well Known Binary*), the concept of a rectangle is not supported and typically rectangles are handled as polygons. This feature allows users to modify the rectangle but requires that the modification keep a rectangular form. The rectangle doesn't need to be straight as long as all of the corner angles are at 90 degrees relative to each other.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Create Inner Ring Sample for WinForms

In this Desktop project we create inner rings for a polygon, based on another polygon, using the GetDifference method. We also learn how to perform a Union on a collection of polygons, and how to set up the TrackEnded event.

To use this app, you need to track a polygon, double click to end it, and it will create an inner ring based on the unioned result of the polygons that are completely within the tracked polygon. You can look at the TrackEnded event handler to see all the different operations that are taking place for that task.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Routing Index Generator Sample for WinForms

The Map Suite Routing Index Generator is a utility that will allow you to generate routing index files (“.rtg” and “.rtx”) from World Streets .sqlite database. These routing index files will be used by the Map Suite Routing Extension in order to calculate routes and driving directions. This utility allows you to specify things that one-way road information, as well as configuring the road speed and type of routes you would like to calculate. It is easily extendable to allow you to add code to deal with other routing situations.

Screenshot

View this sample on Gitlab

Jpeg2000 Sample for WinForms

The Jpeg2000 Sample template represents a .JP2 (JPEG2000) image type to be drawn on the map.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Graphic Logo Adornment Sample for WinForms

This sample shows how you can display your logo on the map using an AdornmentLayer. The advantage of using an Adornment is that the graphic stays in place and doesn't move as you pan your map. The sample should work for various kinds of logos and allow you to change the position using the AdornmentLayer's properties.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Nldas Ascii Grid Layer Sample for WinFoms

This WinForms project demonstrates how you can create a North American Land Data Assimilation System (NLDAS) grid layer. In this sample, you can find what NLDAS grid cells are fully contained in a given Shape file and what cells are partially contained. For each partially contained cell we can calculate what percent of the cell area is contained within the ShapeFile. Please refer to NLDAS grid for details.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Multiple Labels Sample for WinForms

This sample shows how you can display multiple labels for a given point or feature. You can do this by setting a single TextStyle or multiple TextStyles. If you use a single TextStyle, you can simply use a pattern like “[ColumnName1][ColumnName2]…” and when Map Suite displays the text it will combine the values of the columns in your pattern. If you use a different styling method, you will need to manually control the offset of each piece of text to avoid overlapping.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Distance Query On Projected Layers Sample for WinForms

This sample shows how to use the method GetFeaturesWithDistanceOf when the data is projected. We just input the unit which is projected to, do not need to mind what the real unit is for the internal data before projection. It works fine with Map Suite Assemblies 4.5.54.0 or later.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Ecw Sample for WinForms

The Ecw Sample template represents an ECW file for drawing on the map.

ECW: ECW is a wavelet image compression system developed by ER Mapper.It allows you to combine and compress large sets of satellite images into a single file. The images can be accessed very quickly at a variety of scales. It is very popular in the GIS community.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Site Selection Sample for WinForms

The Site Selection sample template allows you to view, understand, interpret, and visualize spatial data in many ways that reveal relationships, patterns, and trends. In the example illustrated, the user can apply the features of GIS to analyze spatial data to efficiently choose a suitable site for a new retail outlet.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Select At Track Shape Sample for WinForms

In today’s Desktop project, we combine the skills we learned in the samples “Spatial Query A Feature Layer” and “Track And Edit Shapes”. You can see how we use the event TrackEnded to get the RectangleShape from the tracked shape of TrackOverlay to do the spatial query. In this example, we use a Rectangle but you could also very easily use another shape such as Polygon, Circle, etc.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Drag Point Advanced Sample for WinForms

This project is an example of how extensible EditInteractiveOverlay is for the editing needs of the user. You can see how to change the styles of the vertex being dragged based on the Shift key, and how to have the vertex snap to any feature.

Thanks to the protected override functions such as KeyDownCore, KeyUpCore, MouseUpCore and DrawCore, these functionalities can easily be implemented by inheriting from EditInteractiveOverlay.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Drag Point With Label Sample for WinForms

In this project, dedicated to EditInteractiveOverlay, you will see how easy it is to add some labeling to your dragged control point, showing dynamic information. Here we show how to display the distance from the dragged control point to the closest point of a reference shape. Also, to augment the user experience, the closest point of the reference shape is also shown varying as the control point is dragged around.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Mr Sid Sample for WinForms

MrSID (pronounced Mister Sid) is an acronym that stands for multiresolution seamless image database. In order to run this sample, development build 10.0.0.0 or later is required.

This sample includes a map with MrSID as base overlay, the MrSID shows the image data of the world range.

Please refer to Wiki for the details.

Screenshot

Known issue: The screenshot is taken under Linux, but it not well tested, maybe sometimes runs to exception.

View this sample on Gitlab

Drag Point Sample for WinForms

In this project, we focus our attention on how to control the style of the control points. You will see how to override the DrawCore function of EditInteractiveOverlay.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Cluster Point Sample for WinForms

ClusterPointStyle is integrated into Map Suite's styles. In this project you will see how to use the ClusterPointStyle for clustering various features into one. Sometimes, the map may have too many features which are stacked on top of each other making the map illegible at higher zoom levels. Clustering is a useful technique as it allows you to group together various features into one labeled symbol with the count of all the features.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Heat Map Sample for WinForms

Heat maps is a technique increasingly used in various fields such in biology and other fields. See http://en.wikipedia.org/wiki/Heat_map. They are also used for displaying areas of webs page most frequently scanned by users. http://csscreme.com/heat-maps/.

At ThinkGeo, we are taking this concept to GIS and applying it to geographic maps. Heat maps are a great way to give the users a visually compelling representation of the distribution and intensity of geographic phenomenon.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

ThinkGeo Cloud Maps Sample for WinForms

This sample demonstrates how you can display ThinkGeo Cloud Maps in your Map Suite GIS applications. It will show you how to use the XYZFileBitmapTileCache to improve the performance of map rendering. ThinkGeoCloudMapsOverlay uses the ThinkGeo Cloud XYZ Tile Server as raster map tile server. It supports 5 different map styles: - Light - Dark - Aerial - Hybrid - TransparentBackground

ThinkGeo Cloud Maps support would work in all of the Map Suite controls such as Wpf, Web, MVC, WebApi, Android and iOS.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Tracked Shapes To WKT Sample for WinForms

In today’s project, we show how to save a tracked shape to WKT (Well Known Text). You will notice that we make the distinction between the shape being tracked and the finished tracked shape thanks to two different events of TrackOverlay, TrackEnding and TrackEnded.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

An early project of the Code Community, “Vehicle Direction”, showed how to rotate the icon of a moving vehicle based on the direction. In today’s project, we are going one step further and we are showing how to display dynamically a bread crumb trail as a trailing tail behind the moving vehicle. For this purpose, we are creating a new LineShape with the latest points at every new position.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Dynamic Track Shapes Sample for WinForms

This Desktop project shows how to handle TrackOverlay to obtain dynamic information about the shape being tracked.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Geocoding Sample for WinForms

Sample Data Download

The Map Suite Geocoder “How Do I?” solution offers a series of useful how-to examples for using the Map Suite Geocoder component. The bundled solution comes with a small set of sample data from Chicago, IL and demonstrates geocoding, reverse geocoding, batch geocoding, use of fuzzy matching logic, getting the closest street number to a point, and much more. Full source code is included in both C# and VB.NET languages; simply select your preferred language to download the associated solution.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Labeling Based On Size Sample for WinForms

This project shows some advanced uses of the ClassBreakStyle to show how to label countries based on the area. You will notice that we also take advantage of the various zoom level sets for labeling purposes. The result is an eye pleasing labeling of the countries, with the size proportionate to the countries’ area, with more countries' labels appearing as you zoom in.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Track Zoom In Without Shift Key Sample for WinForms

This project is for DesktopEdition users. In Map Suite 2.x, different modes of the map are offered to the developer to choose what kind of behavior the map has at a mouse action. In Map Suite 3.x, we went away from modes to have a more flexible model using InteracticeOverlay. By default, track zoom in is done by clicking and dragging the mouse on the map while holding the Shift key. This is very convenient but what if you want to offer the users the same experience as with 2.x, where the same mouse action has different behavior such as TrackZoomIn and Pan through the use of modes.

In this project, we show how to build your own InteractiveOverlay to emulate in Map Suite 3.x the mode behavior 2.x has.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Centering On Moving Vehicle With Tolerance Sample for WinForms

In the previous project, we showed how to center the map on a moving vehicle. While this is great, it has the disadvantage of having to refresh the map each time the vehicle changes position. In this project, we respond to this inconvenience by using a set tolerance used for determining if the map needs to be refreshed or not. If the vehicle moves within a rectangle of a certain size located in the center of the current extent of the map, the map will not refresh and only the moving vehicle will. If it moves outside the tolerance area, the entire map will be refreshed and the tolerance recalculated.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Native Tab File Support Sample for WinForms

One of the most exciting new features in MapSuite 5.0 is native TAB file support. In the past, the FDO extension was used for displaying TAB files in MapSuite. Now with the new TabFeatureLayer, we have a simpler and more stable method of working with TAB files.

This Code Community project demonstrates how to load and display a TAB file using the new TabFeatureLayer. The example also allows you to add, edit and delete features from the TAB file.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Multi Geo Raster Layer Sample for WinForms

MapSuite API has RasterLayer from which inherits MrSIDRasterLayer and ECWRasterLayer etc. If we have many raster files, we would need to add all the raster files as separate layer. However this has a performance issue. In this project, we show how to create a class MultiGeoRasterLayer that treats all the raster file as one layer.

This class show how to do that using JPEG images with its associating JGW world file. It speeds up the loading of a large number of Raster layers by loading and drawing on demand only the files in the current extent. It loads a reference file that contains the bounding box, path and file information for all of the Raster files. We load this information into an in-memory spatial index. When the map requests to draw the layer, we find the Rasters that are in the current extent, create a layer on-the-fly, call their Draw method and then close them. In this way, we load on demand only the files that are in the current extent.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Get Features Clicked On Sample for WinForms

The purpose of this project is to show the technique for finding the feature the user clicked on. To give the user the expected behavior, a buffer in screen coordinates needs to be set so that the feature gets selected within a constant distance in screen coordinates to where the user clicked, regardless of the zoom level.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

ThinkGeo Cloud Maps Sample for Android

This sample demonstrates how you can display ThinkGeo Cloud Maps in your Map Suite GIS applications. It will show you how to use the XYZFileBitmapTileCache to improve the performance of map rendering. ThinkGeoCloudMapsOverlay uses the ThinkGeo Cloud XYZ Tile Server as raster map tile server. It supports 5 different map styles: - Light - Dark - Aerial - Hybrid - TransparentBackground

ThinkGeo Cloud Maps support would work in all of the Map Suite controls such as Wpf, WinForms, Web, MVC, WebApi and iOS.

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

Screenshot

View this sample on Github

ThinkGeo Cloud Maps Sample for iOS

This sample demonstrates how you can display ThinkGeo Cloud Maps in your Map Suite GIS applications. It will show you how to use the XYZFileBitmapTileCache to improve the performance of map rendering. ThinkGeoCloudMapsOverlay uses the ThinkGeo Cloud XYZ Tile Server as raster map tile server. It supports 5 different map styles: - Light - Dark - Aerial - Hybrid - TransparentBackground

ThinkGeo Cloud Maps support would work in all of the Map Suite controls such as Wpf, WinForms, Web, MVC, WebApi and Android.

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

Screenshot

View this sample on Github

Select And Drag Feature Sample for Wpf

In this Wpf project, we show how to select a feature from a shapefile based on a column value using the GetFeaturesByColumnValue. We also show to setup the EditOverlay to give the user the ability to drag the selected feature. In this project, you can also see how to get the world coordinates at the mouse move event. Notice that the code for doing this is quite different in Wpf compared to the winforms edition.

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

Screenshot

View this sample on Github

ThinkGeo Cloud Maps Sample for Mvc

This sample demonstrates how you can display ThinkGeo Cloud Maps in your Map Suite GIS applications. It will show you how to use the XYZFileBitmapTileCache to improve the performance of map rendering. ThinkGeoCloudMapsOverlay uses the ThinkGeo Cloud XYZ Tile Server as raster map tile server. It supports 5 different map styles: - Light - Dark - Aerial - Hybrid - TransparentBackground

ThinkGeo Cloud Maps support would work in all of the Map Suite controls such as Wpf, WinForms, Web, WebApi, Android and iOS.

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

Screenshot

View this sample on Github

Display ThinkGeo Cloud Maps Sample for JavaScript

This sample demonstrates how you can display ThinkGeo Cloud Maps in a web page using javascript. It supports 5 different map styles: - Light - Dark - Aerial - Hybrid - TransparentBackground

ThinkGeo Cloud Maps works in all of the Map Suite controls such as Wpf, WinForms, Web, Android and iOS.

Screenshot

View this sample on Github

Preset Vertex To Tracked Polygon Sample for WinForms

This Desktop sample shows how to extend TrackInteractiveOverlay to give the ability to add a preset vertex to a track polygon while tracking. This can be handy in the situations where you need to add a vertex outside the current extent of the map or when you need to add a vertex with precise X and Y values. In the custom PresetVertexTrackInteractiveOverlay, you can see how the protected function GetTrackingShapeCore was overridden to implement this tracking behavior of the polygon.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Us Earthquake Statistics Sample for WinForms

The Earthquake Statistics sample template is a statistical report system for earthquakes that have occurred in the past few years across the United States. It can help you generate infographics and analyze the severely afflicted areas, or used as supporting evidence when recommending measures to minimize the damage in future quakes.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

How Do I Sample for WinForms

The “How Do I?” samples collection is a comprehensive set containing dozens of interactive samples.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Kml Sample for WinForms

KML is the file format for displaying geographic data in a Google Earth browser such as Google Earth. Now, you can also display such a file on a Map Suite control. Thanks to its flexible architecture to extent to new file formats, in today’s project we wrote the logic for supporting KML. Look at the class KmlfeatureSource inheriting from FeatureSource to see how the logic for reading FML files was implemented. As well, you can see the class KmlStyle inheriting from Style for the drawing logic. And feel free to modify and improve those classes with your own implementations.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Intersect Line Sample for WinForms

In today’s project, we show how to split a line based on an intersecting line. To accomplish this task, basically two steps are needed. First, you need to find the crossing point using the GetCrossing function and then you split the line based on the crossing point using the GetLineOnLine function. If you are in the utilities industry working with electric network, gas pipes etc, you will find this project useful.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Dragging Icon Advanced Sample for WinForms

This project is a more complete version of a previous project “Dragging Icon”. In addition to showing how to use EditInteractiveOverlay for dragging and dropping features represented by an icon, we also show how to add new features on the map by left double clicking on the map. You will also see how to remove a feature by right double clicking on its icon.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab


Quickstart Sample for WPF

Description

This Quickstart Sample will guide you through the process of creating a sample application and will help you become familiar with creating maps with ThinkGeo UI. This sample project supports ThinkGeo UI 12.0.0.0 and higher and will show you how to create a WPF application using the ThinkGeo UI Desktop for WPF control.

Quick Start Video:

- ThinkGeo UI WPF Quick Start in VS Code - Part 1 - Basemap

- ThinkGeo UI WPF Quick Start in VS Code - Part 2 - Adding a ShapeFile

Please refer to our Wiki for more details.

Screenshot

About the Code

ShapeFileFeatureLayer capitalLabelLayer = new ShapeFileFeatureLayer(@"../../Data/WorldCapitals.shp");
GeoFont font = new GeoFont("Arial", 9, DrawingFontStyles.Bold);
GeoSolidBrush txtBrush = new GeoSolidBrush(GeoColor.StandardColors.Maroon);
TextStyle textStyle = new TextStyle("CITY_NAME", font, txtBrush);
textStyle.XOffsetInPixel = 0;
textStyle.YOffsetInPixel = -6;
capitalLabelLayer.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.CreateSimpleTextStyle("CITY_NAME", "Arial", 8, DrawingFontStyles.Italic, GeoColor.StandardColors.Black, 3, 3);
capitalLabelLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level05;

capitalLabelLayer.ZoomLevelSet.ZoomLevel06.DefaultTextStyle = textStyle;

Getting Help

About ThinkGeo

ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.

Quickstart Sample for Wpf

The Map Suite WPF QuickStart Guide will guide you through the process of creating a sample application and will help you become familiar with Map Suite. This QuickStart Guide supports Map Suite 10.0.0.0 and higher and will show you how to create a WPF application using Map Suite WPF components.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

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 Gitlab

Vehicle Tracking Sample for Wpf

The Vehicle Tracking sample template gives you a head start on your next tracking project. With a working code example to draw from, you can spend more of your time implementing the features you care about and less time thinking about how to accomplish the basic functionality of a tracking system.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

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 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.

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 for the details.

Screenshot

View this sample on Gitlab

Overlays Sample for Wpf

Discover how to use Overlays to build up your map, or to add existing basemaps to your application. The sample can show the following four basemaps:

1. Google Maps
2. Bing Maps
3. ThinkGeo Cloud Maps
4. Open street Maps

It can display different styles of maps by setting the map type. Note: you do need to have Bing Maps API key and Google Maps API key to be able to use these two basemaps.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Map Suite GIS Editor

Map Suite GIS Editor for Windows lets you design stunning maps, perform geo-analysis and visualize your data. Powerful enough for professional GIS technicians yet accessible enough for nearly anyone who needs to create a map. The GIS Editor is designed as a single-application solution to all of your GIS visualization needs. Now it is open source and free. You can use the Map Suite GIS Editor to: - Quickly build maps using simple and intuitive tools - Visualize data, statistics and trends geographically - Design, style and label rich and detailed maps - Integrate data from a variety of sources, including Web Map Services - Draw right on the map, edit and create feature data - Make your maps publication-ready with titles, legends and annotations You can do all of this without wading through stacks of cryptic toolbars or scouring nested menus. The GIS Editor's simple ribbon bar interface puts its full complement of GIS tools at your fingertips in an easy-to-understand way. Wizards make short work of batch geoprocessing, geocoding and re-projection operations. And with the built-in Data Repository, you can keep all of your data close at hand, regardless of where it lives.

Looking for a customized GIS Editor or custom plug-ins? Please contact sales@thinkgeo.com for more details.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

How Do I Sample for Wpf

Description

The “How Do I?” samples collection is a comprehensive set containing dozens of interactive samples. Available in C#, these samples are designed to hit all the highlights of Map Suite, from simply adding a layer to a map to performing spatial queries and applying a thematic style. Consider this collection your “encyclopedia” of all the Map Suite basics and a great starting place for new users.

Please refer to Wiki for the details.

Screenshot

About the Code

Working…

Getting Help

About ThinkGeo

ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.

Map Touch Sample for Wpf

Map Suite WPF Edition supports touch events. This sample shows how to add a marker to map by MapTap event.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

In this sample we show you how to add robust printing support to your Map Suite applications for the desktop, WPF, web or services environments. Using the code in this sample, you'll be able to build a Print Preview interface that lets your users interactively arrange items (such as a map, scale line, labels, data grid or image) on a virtual page before printing the result to a printer, exporting to a PDF or to a bitmap image. Maps are printed using vector graphics so you can be sure the output will look great on anything from a PDF to a large plotter. The printing system also includes low-level report building classes that make it easy to generate reports in the web or services environment.

To help you understand the sample, as well as Map Suite's new printing system upon which it is based, check out our instructional video that will introduce you to all of these concepts and walk you through the sample solution.

Please note that you will need version 5.0.102.0 or newer of Map Suite in order to use the new printing features. For more information on how to upgrade, see the Map Suite Daily Builds Guide.

Note: Users of Map Suite Web, Silverlight and Services Editions will not have access to the interactive drag-and-drop page layout interface pictured here. However, these editions can still be used to programmatically design page layouts in code and then export them to a printer.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

About the Code

Map1.ZoomLevelSet = new PrinterZoomLevelSet(Map1.MapUnit, PrinterHelper.GetPointsPerGeographyUnit(Map1.MapUnit));

PrinterInteractiveOverlay printerOverlay = new PrinterInteractiveOverlay();

Map1.InteractiveOverlays.Add("PrintPreviewOverlay", printerOverlay);
Map1.InteractiveOverlays.MoveToBottom("PrintPreviewOverlay");

PagePrinterLayer pagePrinterLayer = new PagePrinterLayer(PrinterPageSize.AnsiA, PrinterOrientation.Portrait);
pagePrinterLayer.Open();
printerOverlay.PrinterLayers.Add("PageLayer", pagePrinterLayer);

Getting Help

About ThinkGeo

ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.

Building 3D Layer Sample for Wpf

This project shows to create simulated 3D buildings on WPF map control and OsmBuildingOnlineServiceFeatureLayer.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Routing Data Explorer Sample for Wpf

This is a simple routing data viewer sample viewer which demonstrates how to use the RoutingEngine to get the shortest or fastest route in your Map Suite GIS applications.

How to use this tool:

1. Load rtg data:  Click menu “File→Load” browse to a rtg file. You also require a shapefile for the routing source file in the same folder, otherwise it display message “Could not find shp file in the same folder where you seleted”. 2. Start routing:

Use left click for a start point and right click for an end point. If there is no route within **200** meters(you can modify this in source code), the explorer displays a message "There’s no road within 200 meters to where you clicked on".   

This RoutingEngine supports routing in all of the Map Suite controls such as WinForms, Web, MVC and WebApi.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

ThinkGeo Cloud Maps Sample for Wpf

This sample demonstrates how you can display ThinkGeo Cloud Maps in your Map Suite GIS applications. It will show you how to use the XYZFileBitmapTileCache to improve the performance of map rendering. ThinkGeoCloudMapsOverlay uses the ThinkGeo Cloud XYZ Tile Server as raster map tile server. It supports 5 different map styles: - Light - Dark - Aerial - Hybrid - TransparentBackground

ThinkGeo Cloud Maps support would work in all of the Map Suite controls such as Wpf, Web, MVC, WebApi, Android and iOS.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Display Cad File Sample for WinForms

This sample demonstrates how you can read data from an CAD file(*.dwg, *.dxf) in your Map Suite GIS applications, and how to render it with CAD embedded style as well as a customized style. This Cad File support would work in all of the Map Suite controls such as Wpf, Web, MVC and WebApi.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Zoom To Full Extent Wpf Sample for Wpf

This is a simple project that shows how to set the current extent based on a collection of layers. You can use this technique for the common task of having the map set to the full extent. Instead of having to manually set the full extent, you can pass all the layers you want the full extent to be based on.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Place search world reverse geocoding sample for Wpf

In this sample, we show how you can use Map Suite World Reverse Geocoding SDK to turn a geographic location into meaningful addresses. It ships with an optimized set of worldwide coverage of cities and towns, but any customized data can be supported as well.

Screenshot

What areas does the World Reverse Geocoding cover?

BuildingSamples-ForWpf

In this WPF project, we show how to use `BuildingOverlay`, `BuildingStyle` and `OsmBuildingOnlineServiceFeatureLayer`.

This repo contains three projects. - BuildingOverlay represents a WPF specific overlay that simulates the 2.5D building rendering. - BuildingStyle represents a style for building that is compatible with the other products such as WPF, WinForms and Web. - OsmBuildingOnlineServiceFeatureLayer represents the online data source of feature layer.

 Build Preview

View this sample on Gitlab

PerformanceSample-ForWpf

This is a WPF desktop sample for drawing performance test of MapSuite product. When running the sample, it will render 16,000 count of rectangle shape features at first, these features will be distributed in 4 layers averagely. After clicking Start button the sample application will update 1,600 count of rectangle shape features per 1,000 milliseconds, the time cost of features drawing will display in the application footer. Customer can modify the update rate, update features count, and enable or disable the layers.

Key Points

- The rectangle shape is added to an InMemoryFeatureLayer, the layer uses a ValueStyle to draw the shape. The ValueStyle has 4 count of ValueItems which the item Id is from 0 to 3 and the item AreaStyle uses 4 different of fill colors. The shape also has a column value of 0 at the first time, the ValueStyle will use this value to draw the shape using corresponding AreaStyle.

- In each update, the application will choose 1,600 count of features from all valid features randomly to modify their column values. The column value will be modified to 0, 1, 2 or 3 circularly.

- The CustomLayerOverlay will be used in the update, the application will create a new InMemoryFeatureLayer and add it to this overlay when updating, all determined 1,600 count of features will be added to the layer. The previous overlay will be removed if it exists in the map, then a new overlay will be added to the map. Before removing the previous overlay, the all resources (include all layer tiles and background images) from the overlay will be drawn on a GeoImage, then set the GeoImage to the background image of the new overlay. We do this to make sure only 1,600 count of features would be rendered in each update, and the previous updated features would be displayed correctly in the map.

- Customer can check or uncheck the layers in the right list of the application form, the application will only choose the features which in the checked layers when updating, and the unchecked layers will be hidden in the map.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Filter Style Sample for Wpf

This project outlines how to apply the FilterStyle to a layer's display. By using this style, the map will filter the features queried from the source file by checking if a specified column value fits the input condition. This effect can be applied to all the Map Suite products.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

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 for the details.

Screenshot

View this sample on Gitlab

Annotation Style Sample for Wpf

Description

In this project you will see how to use the AnnotationStyle to display and edit a feature depending on the value of a specific property in its data source.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

About the Code

       
protected override void DrawCore(IEnumerable<Feature> features, GeoCanvas canvas, Collection<SimpleCandidate> labelsInThisLayer, Collection<SimpleCandidate> labelsInAllLayers)
{
    foreach (var feature in features)
    {
        if (feature.GetWellKnownType() == WellKnownType.Line)
        {
            LineShape lineShape = (LineShape)feature.GetShape();
            Feature newFeature = new Feature(lineShape.Vertices[0]);
            newFeature.ColumnValues.Add(TextColumnName, feature.ColumnValues[TextColumnName]);
            var labelingCandidates = GetLabelingCandidates(newFeature, canvas, Font, XOffsetInPixel, YOffsetInPixel, RotationAngle);
            foreach (var labelingCandidate in labelingCandidates)
            {
                PolygonShape maskArea = ConvertPolygonShapeToWorldCoordinate(labelingCandidate.ScreenArea, canvas.CurrentWorldExtent, canvas.Width, canvas.Height);
                PointShape closestPoint = maskArea.GetClosestPointTo(new PointShape(lineShape.Vertices[1]), canvas.MapUnit);
                if (closestPoint != null)
                {
                    lineShape.Vertices[0] = new Vertex(closestPoint.X, closestPoint.Y);
                    LeaderLineStyle.Draw(new LineShape[] { lineShape }, canvas, labelsInThisLayer, labelsInAllLayers);
                }

                DrawMask(labelingCandidate, canvas, labelsInThisLayer, labelsInAllLayers);

                foreach (LabelInformation labelInfo in labelingCandidate.LabelInformation)
                {
                    var textPathInScreen = new ScreenPointF((float)labelInfo.PositionInScreenCoordinates.X, (float)labelInfo.PositionInScreenCoordinates.Y);
                    canvas.DrawText(labelInfo.Text, Font, TextBrush, HaloPen, new ScreenPointF[] { textPathInScreen }, DrawingLevel, 0, 0, DrawingTextAlignment.Default, (float)labelInfo.RotationAngle);
                }
            }
        }
    }
}

Getting Help

About ThinkGeo

ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.

Hello World Sample for Wpf

This sample shows you how to get started building your first application with the Map Suite Desktop for Wpf 10.0.0.

Please refer to Wiki for the details.

Screenshot

View this sample on Github

Usgs Dem Sample for Wpf

This sample demonstrates how you can read data from an DEM file in your Map Suite GIS applications, and how to render it with DEM embedded value style as well as a customized style. This DEM File support would work in all of the Map Suite controls such as Wpf, Web, Android and iOS.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Touch Events Sample for Wpf

This sample shows how to take advantage of touch screen to manipulate that map using one’s fingers. Learn how the map can be panned, zoomed in and out or rotated using two fingers. On addition, markers can be added, and shapes can be added and edited by tapping the screen.

The sample code makes this straight forward to implement.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Wmts Layer Sample for Wpf

This project shows how to consume data from a WMTS Server using WmtsLayer. You would find the code pretty straightforward, just like displaying a shapefile, while behind the scenes we request tiles from the server asynchronously and efficiently, and stitch them into a proper map.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Reproject Wmts Sample for Wpf

Description

In today’s project, we show how to create your own projection class that allows projecting a WMTS layer from any internal projection to any external.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

About the Code

wmtsLayer = new WmtsLayer();
wmtsLayer.WmtsSeverEncodingType = ThinkGeo.MapSuite.Layers.WmtsSeverEncodingType.Kvp;
wmtsLayer.ServerUris.Add(new Uri("https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/WMTS"));
wmtsLayer.ActiveLayerName = "USGSImageryOnly";
wmtsLayer.ActiveStyleName = "default";
wmtsLayer.TileMatrixSetName = "GoogleMapsCompatible";
wmtsLayer.OutputFormat = "image/png";
wmtsLayer.Projection = new Proj4Projection(3857, 4326);
wmtsLayer.ProjectedTileCache = new FileBitmapTileCache("WmtsProjectedTileCache", "USGSImageryOnly-4326");
wmtsLayer.TileCache = new FileBitmapTileCache("WmtsTileCache", "USGSImageryOnly-3857");

Getting Help

About ThinkGeo

ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.

Show A Legend Sample for Wpf

In today’s project we learn how to display a simple legend using the new and improved LegendAdornmentLayer. The improved LegendAdornmentLayer was added to Map Suite 5.0 and provides an easy to use API for creating legend adornments. The LegendAdornmentLayer is part of Map Suite Core which allows you to access this powerful feature across all Map Suite products.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Rotate Events Sample for Wpf

This sample shows how to take the advantage of a touchable screen, to play with the map using fingers. You would see we can pan the map with one finger, zoom in/out or rotate a map using 2 fingers. Not only that, we can add a marker, and track/edit a shape (point, line or polygons) by tapping on the screen. And marker/popup/label won't rotate with the map. It is straightforward to use and checking out the code, you would see it is very simple to implement with Map Suite! It is available in 8.0.48.0 or later.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Draggable Labels Sample for Wpf

In this WPF project, you will learn how to place labels from a shapefile into a SimpleMarkerOverlay. Using the DragMode property of the SimpleMarkerOverlay, the user can then drag the labels to place them at the desired location for the most pleasing labeling effect. This project will be later completed to show how to save the state of the dragged labels from the SimpleMarkerOverlay and reload them.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

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 for the details.

Screenshot

View this sample on Github

Site Selection Sample for Wpf

The Site Selection sample template allows you to view, understand, interpret, and visualize spatial data in many ways that reveal relationships, patterns, and trends. In the example illustrated, the user can apply the features of GIS to analyze spatial data to efficiently choose a suitable site for a new retail outlet.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Mini Map Sample for Wpf

This project shows how to create a simple mini map to give a reference of where you are when you zoomed in. As for the MiniMapAdormentLayer inherits from AdornmentLayer.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

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 for the details.

Screenshot

View this sample on Gitlab

Building 3D Sample for Wpf

This project shows to create simulated 3D buildings on WPF map control and Shapefile.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Friends Network Sample for Wpf

In this WPF project we show how you can create a friends network using a point with a circle symbol. It’s a combination of PointStyle and TextStyle, including a description with a mask that keeps the labels in the same layer. It was originally required by a customer at http://community.thinkgeo.com/t/label-on-a-circle-with-lot-of-points/8193/6, it’s a solution with many applications.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

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 for the details.

Screenshot

View this sample on Gitlab

US Demographic Map Sample for Wpf

The Demographic and Lifestyle sample template gives you a head start on your statistics project, which includes details about race, age, gender, land usage, and more for all the states in U.S. The template contains pre-styled layers that can be used as-is, or as the foundation for adding your own map notes and layers.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Elevation Statistics Sample for WPF

This Sample shows the elevation data of a road in the form of a line [chart][1].

- Elevation SDK - support query elevation data by points, line and polygon based on [SRTM][2] and Ned13 elevation source data. - For point - Create a buffer and aggregate all points within buffer to create average for the elevation of the point. - For line - There are two ways to get the elevation data of the line. First, get the points on the line by setting the interval distance. The other, is to take the points by setting the number of points to be fetched. Then query the elevation data of the point. - For polygon - By setting the interval distance, clip the polygon to the grids and get all the center of the grids where the polygon is located. Now, determine whether the center points are within the surface or inside the surface (use improved arc-length method).

Screenshot

View this sample on Gitlab

Local Datum UTM Sample for Wpf

The purpose of this WPF sample is to get familiar with the concept of datum and datum shift in UTM and Geographic coordinates. Using local data, you might be required to apply datum transformation to your data to go from an old datum to a more recent datum. Here we are taking the example of Australia, which went to change its datum (from AGD84 to GDA94) for its mapping purposes. We show how to apply the datum transformation in both the longitude/latitude coordinate system and in the local UTM systems (AMG based on AGD84 and MGA based on GD94).

See the code and note the comments in the MouseMove event where all the projection logic is taken place. Notice that the correction is about 200 meters. Once you understand for the case for Australia, you will be able to apply the same principles for your own datums in UTM.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Multi Line Labeling Sample for Wpf

For labeling purpose, TextStyle has a property called LabelAllPolygonParts that will label all the parts making up a polygon based feature. Unfortunately, we don’t have an equivalent API for labeling all the parts of a line based feature. But thanks to the flexible framework of Map Suite, we show in this WPF sample how easily you can expand the TextStyle class to allow this labeling capability. Look at the custom class MultiLinetextStyle and how DrawCore function is overridden to have the expected labeling behavior.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Cluster Feature Layer Sample for Wpf

The sample shows how to use ClusterFeatureLayer to render the specified column data as a pie chart. Allows users to compare data visually.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Google Map To Geodetic Sample for Wpf

In this Wpf project, we are showing a trick for getting the current extent of the map with Google Map as an image and displaying it on a map in decimal degrees unit. You may be in a situation where you want the details and accuracy of Google Map, especially the satellite view but want to have it displayed on your map in decimal degrees. In this sample, you will see how to get the Google Map image and create the accompanying world file for decimal degrees. Notice that we are realizing an affine transformation on the image to go to Geodetic as illustrated in the case 3

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

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 for the details.

Screenshot

View this sample on Gitlab

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 for the details.

Screenshot

View this sample on Gitlab

ThinkGeo MBTiles Maps Sample for WPF

This sample demonstrates how you can draw the map with Vector Tiles saved in *.MBTiles in your Map Suite GIS applications, with any style you want from StyleJSON (Mapping Defination Grammar). It will show you how to use the XyzFileBitmapTileCache to improve the performance of map rendering. It supports have 3 built-in default map styles and more awasome styles from StyleJSON file you passed in, by 'Custom': - Light - Dark - TransparentBackground - Custom

If you want the *.mbtile file of any area in the world, or you have any requirement of building *.mbtile file based on your own data, such as shape file, Oracle, MsSql and more, please contact support@thinkgeo.com.

*.MBTile format can be supported in all of the Map Suite controls such as Wpf, Web, MVC, WebApi, Android and iOS.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Four Color Map Sample for Wpf

Any map can be colored using four colors in such a way that adjacent regions receive different colors. The sample discover how to use ShapeFileFeatureLayer to get four color features, then use ValueStyle to render the four color map.

At present, the four color map only supports polygon, and doesn't support point and line.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Elevation Grade Of Line Sample for Wpf

In this sample, we show how you can use Map Suite Elevation SDK to get the elevation values of a specific line for your .NET application. It allows you to customize your query to get data as detailed as you need it to be. Draw elevation profiles for your hiking or biking trip, contral the granularity of the response, sample elevation values at controllable intervals along a route should be shown up.

Screenshot

View this sample on Gitlab

Custom Parameters Projection Sample for Wpf

In today’s Wpf project, we learn more about projection and how to handle a special case where the projection information in the PRJ file of a shapefile is not found as an EPSG or ESRI code in the spatial reference web site (www.spatial-reference.org). The strategy in this case is to build a proj4 string based on the parameters found in the PRJ file. Note that you must pay special attention to the false easting or northing parameters as they are always expressed in meters even if the projection is in another unit such as feet. For this example, we show how to convert from the local projection in Lambert Conformal Conic with regional specific parameters to Geodetic (WGS84) to match the World Map Kit.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Class Break Style Sample for Wpf

Description

In this project you will see how to use the ClassBreakStyle to group and render features by values. ClassBreakStyle is a useful technique as it allows you to group various features by the specified values, then applies differently style to the feature groups.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

About the Code

Use a ClassBreakStyle to colorize each state differently depending on the range into which its population falls. This value is found in the states ShapeFile DBF in the column named “POP1990”.

ClassBreakStyle statesStyle = new ClassBreakStyle("POP1990");
statesStyle.ClassBreaks.Add(
    new ClassBreak(value: 0, areaStyle: AreaStyles.CreateSimpleAreaStyle(
        fillBrushColor: GeoColors.LightGray,
        outlinePenColor: GeoColors.DarkGray,
        outlinePenWidth: 1)
    )
);
statesStyle.ClassBreaks.Add(
    new ClassBreak(value: 1000000, areaStyle: AreaStyles.CreateSimpleAreaStyle(
        fillBrushColor: GeoColors.LightBlue,
        outlinePenColor: GeoColors.CornflowerBlue,
        outlinePenWidth: 1)
    )
);
statesStyle.ClassBreaks.Add(
    new ClassBreak(value: 3500000, areaStyle: AreaStyles.CreateSimpleAreaStyle(
        fillBrushColor: GeoColors.SkyBlue,
        outlinePenColor: GeoColors.DeepSkyBlue,
        outlinePenWidth: 1)
    )
);
// Add stateStyle to the statesLayer and apply the style to all zoom levels.
statesLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(statesStyle);
statesLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;

Getting Help

About ThinkGeo

ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.

Arc GIS Server Rest Layer Sample for WPF

In this wpf-based project, we'll demonstrate the new ArcGISServerRestLayer released with Map Suite 9.0. This layer gives developers a simple and powerful tool to access their maps that reside on ArcGIS Server. This new layer utilizes the ArcGIS Server REST API. Now, the latest version of Map Suite Core can support that. In order to run this project, you will need the Development Build 9.0.443.0 or later.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Large Scale Map Printing Sample for Wpf

This WPF project is the second in our series of samples on printing. The

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Labeling Flight Lines Sample for Wpf

This sample shows how to offset arc shaped flight lines so multiple from point to point are visible and then show popup labels providing information on the flights the lines represent.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Default Value Style Sample for Wpf

In today’s Wpf project, we demonstrate the extensibility of ThinkGeo API by creating a custom Style. Inheriting from ValueStyle, we create a Default Value Style that handles the drawing of features that don’t have a value defined in the ValueStyle. Here we are using a point based layer with PointStyle. Note that the Default ValueStyle would also work with line and polygon based layers.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Clipping On Line Layer Sample for Wpf

This Wpf project completes the series of projects dedicated to the clipping geoprocessing. We already saw how to perform clipping on a polygon based layer in “Clipping” and on a point layer in “Clipping On Point Layer”. Here we show how to perform the clipping geopressing on a line based layer. As for the same operation on a polygon based layer, the key geometric function is GetIntersection. We will also appreciate the operation of creating a layer from scratch as in addition to the geometric operation itself, geoprocessing also involves creating a result layer from the original layers, the clipping layer and the clipped layer.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Graticule With Google Projection Sample for Wpf

In this Wpf project, we explore more features of the GraticuleAdornmentLayer, which shows meridians and parallels at various intervals based on the zoom level. Being natively in Geodetic, GraticuleAdornmentLayer can be set to any projection. In this project’s example, you have the graticule showing with World Map Kit in Spherical Mercator (Google Map projection). Also, note how easily you can change the appearance with properties such as GraticuleLineStyle and GraticuleTextFont.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

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 for the details.

Screenshot

View this sample on Gitlab

Display Oracle Data Sample for Wpf

Discover how to use OracleFeatureLayer to build up your map. Use oracle data to render map.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Adjacent Road Search Sample for Wpf

This WPF project shows how to get a route between two adjacent roads, even if they don't intersect within an allowable tolerance.

It’s based on Map Suite Geometry Topology module and does not require the Map Suite Routing Extension.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

NOAA Global 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 for the details.

Screenshot

View this sample on Gitlab

SQLite Bitmap Tile Cache Sample for Wpf

This sample shows how you can cache the tile images in SQLite database.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Wmts Tiled Overlay Sample for Wpf

This project shows how to consume data from a WMTS Server using WmtsOverlay. You would find the code pretty straightforward, while behind the scenes we request tiles from the server asynchronously and efficiently, and stitch them into a proper map. This class is introduced from version 6.0.187.0, besides this WmtsOverlay, we also have WmtsLayer available.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Display File GeoDatabase Sample for Wpf

This sample demonstrates how you can read data from an ESRI FileGeodatabase, and you will find the code as straightforward as consuming any other data source in Map Suite.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Multiple Dot Density Styles Sample for Wpf

This sample takes a detailed look at the DotDensityStyle. You can combine different DotDensityStyles on one FeatureLayer using different columns. Demographic data are usually well fit to be used with that type of style. Here each dot of a certain color represents 100,000 persons of the same age group by state. Using multiple DotDensityStyles, the dimension of age group demographics is added to the representation of population density.

Note that the PointToValueRatio is used to set how many people a dot is going to represent. For example, if you want a dot to represent 100,000 persons, you set it to 0.00001 (1 / 100000). If you want it to be 500,000 persons, you set it to 0.000002 (1 / 500000).

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

BackgroundMapSwitchingSample-ForWpf

This sample shows you how to use these four different types of maps as background in Map Suite Desktop (WPF) Edition. - ThinkGeo Cloud Maps - Open Street Map - Bing Maps - Google Maps

Screenshot

View this sample on Gitlab

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 for the details.

Screenshot

View this sample on Gitlab

Cluster Point Sample for Wpf

Description

ClusterPointStyle is integrated into ThinkGeo's styles. In this project you will see how to use the ClusterPointStyle for clustering various features into one. Sometimes, the map may have too many features which are stacked on top of each other making the map illegible at higher zoom levels. Clustering is a useful technique as it allows you to group together various features into one labeled symbol with the count of all the features.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

About the Code

ClusterPointStyle clusterPointStyle = new ClusterPointStyle();
clusterPointStyle.MinimumFeaturesPerCellToCluster = 1;
clusterPointStyle.DefaultTextStyle = TextStyle.CreateSimpleTextStyle("FeatureCount", "Arail", 10, 
                                                         DrawingFontStyles.Regular, GeoColors.Black);
clusterPointStyle.DefaultTextStyle.TextPlacement = TextPlacement.Center;
clusterPointStyle.DefaultTextStyle.OverlappingRule = LabelOverlappingRule.AllowOverlapping;
clusterPointStyle.DrawingClusteredFeature += ClusterPointStyle_DrawingClusteredFeature;

private void ClusterPointStyle_DrawingClusteredFeature(object sender, 
   DrawingClusteredFeatureClusterPointStyleEventArgs e)
{
    classBreakStyle = classBreakStyle ?? GetClassBreakStyle("FeatureCount");
    e.Styles.Add(classBreakStyle);
}

private ClassBreakStyle GetClassBreakStyle(string columnName)
{
    ClassBreakStyle classBreakStyle = new ClassBreakStyle();
    classBreakStyle.ColumnName = columnName;

    PointStyle pointStyle1 = new PointStyle(PointSymbolType.Circle, 8, 
                                            new GeoSolidBrush(GeoColor.FromArgb(250, 100, 200, 100)),
                                            new GeoPen(GeoColor.FromArgb(100,120, 200, 120), 5));
    classBreakStyle.ClassBreaks.Add(new ClassBreak(1, pointStyle1));

    PointStyle pointStyle2 = new PointStyle(PointSymbolType.Circle, 15, 
                                            new GeoSolidBrush(GeoColor.FromArgb(250, 222, 226, 153)), 
                                            new GeoPen(GeoColor.FromArgb(100 222, 226, 153), 8));
    classBreakStyle.ClassBreaks.Add(new ClassBreak(2, pointStyle2));

    PointStyle pointStyle3 = new PointStyle(PointSymbolType.Circle, 25, 
                                            new GeoSolidBrush(GeoColor.FromArgb(250, 255, 183, 76)),
                                            new GeoPen(GeoColor.FromArgb(100,255, 183, 76), 10));
    classBreakStyle.ClassBreaks.Add(new ClassBreak(5, pointStyle3));

    PointStyle pointStyle4 = new PointStyle(PointSymbolType.Circle, 35, 
                                            new GeoSolidBrush(GeoColor.FromArgb(250, 243, 193, 26)),
                                            new GeoPen(GeoColor.FromArgb(100,243, 193, 26), 15));
    classBreakStyle.ClassBreaks.Add(new ClassBreak(10, pointStyle4));

    PointStyle pointStyle5 = new PointStyle(PointSymbolType.Circle, 40, 
                                            new GeoSolidBrush(GeoColor.FromArgb(250, 245, 7, 10)),
                                            new GeoPen(GeoColor.FromArgb(100,245, 7, 10), 15));
    classBreakStyle.ClassBreaks.Add(new ClassBreak(100, pointStyle5));

    PointStyle pointStyle6 = new PointStyle(PointSymbolType.Circle, 50, 
                                            new GeoSolidBrush(GeoColor.FromArgb(250, 245, 7, 10)),
                                            new GeoPen(GeoColor.FromArgb(100,245, 7, 10), 20));
    classBreakStyle.ClassBreaks.Add(new ClassBreak(500, pointStyle6));

    return classBreakStyle;
}

Getting Help

About ThinkGeo

ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.

Mask Raster Layer Sample for Wpf

This sample shows how to use GeoTiff raster layer to mask the background map and allows users to draw a polygon shape in order to only show the raster image which is covered by the polygon. The rendering logic can be applied to other RasterLayers by overwriting DrawCore method.

Please refer to Wiki for the details.

Screenshot

View this sample on Github # Weather Line Style Sample for Wpf

### Description

In this WPF sample, we learn how to extend LineStyle class to create a style for representing weather fronts, such as cold front, warm front, or occluded front for your weather maps. To achieve that styling a regular LineStyle is used for the front line itself. For symbolizing the type of front an icon is used.

Notice the two handy properties to give you more control: Spacing property to adjust the distance in screen coordinate between each symbol on the line, and Side property to control on what side of the line front the symbols should appear. Of course, as you zoom in and out on the map the spacing between each symbol remain the same as it is set in screen coordinate.

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

![Screenshot](https://github.com/ThinkGeo/WeatherLineStyleSample-ForWpf.NETCore/blob/master/ScreenShot.png)

### About the Code ```csharp class customGeoImageLineStyle : LineStyle {

  protected override void DrawCore(IEnumerable<Feature> features, GeoCanvas canvas, 
           System.Collections.ObjectModel.Collection<SimpleCandidate> labelsInThisLayer,
           System.Collections.ObjectModel.Collection<SimpleCandidate> labelsInAllLayers)
  {
     PointStyle pointStyle = new PointStyle(geoImage);
     foreach (Feature feature in features)
      {
          LineShape lineShape = (LineShape)feature.GetShape();
          lineStyle.Draw(new BaseShape[] { lineShape }, canvas, labelsInThisLayer, labelsInAllLayers);
          double totalDist = 0;
          for (int i = 0; i < lineShape.Vertices.Count - 1; i++)
          {
              PointShape pointShape1 = new PointShape(lineShape.Vertices[i]);
              PointShape pointShape2 = new PointShape(lineShape.Vertices[i + 1]);
              LineShape tempLineShape = new LineShape();
              tempLineShape.Vertices.Add(lineShape.Vertices[i]);
              tempLineShape.Vertices.Add(lineShape.Vertices[i + 1]);
              double angle = GetAngleFromTwoVertices(lineShape.Vertices[i], lineShape.Vertices[i + 1]);
              if (side == SymbolSide.Left)
                  if (angle >= 270) { angle = angle - 180; }
              else
                  if (angle <= 90) { angle = angle + 180; }
              
              pointStyle.RotationAngle = (float)angle;
              float screenDist = ExtentHelper.GetScreenDistanceBetweenTwoWorldPoints(
                          canvas.CurrentWorldExtent,pointShape1, pointShape2, canvas.Width, canvas.Height);
              double currentDist = Math.Round(pointShape1.GetDistanceTo(pointShape2, canvas.MapUnit,
                                                                        DistanceUnit.Meter), 2);
              double worldInterval = (currentDist * spacing) / screenDist;
              while (totalDist <= currentDist)
              {
                  PointShape tempPointShape = tempLineShape.GetPointOnALine(StartingPoint.FirstPoint,
                                                            totalDist, canvas.MapUnit, DistanceUnit.Meter);
                  pointStyle.Draw(new BaseShape[] { tempPointShape }, canvas,
                                                                     labelsInThisLayer, labelsInAllLayers);
                  totalDist = totalDist + worldInterval;
              }
              totalDist = totalDist - currentDist;
           }
      }
  }

} ``` ### Getting Help

[Map Suite Desktop for Wpf Wiki Resources](http://wiki.thinkgeo.com/wiki/thinkgeo_desktop_for_wpf)

[Map Suite Desktop for Wpf Product Description](https://thinkgeo.com/ui-controls#desktop-platforms)

[ThinkGeo Community Site](http://community.thinkgeo.com/)

[ThinkGeo Web Site](http://www.thinkgeo.com)

### About ThinkGeo ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.

Tracked Shapes To File Sample for Wpf

In this Wpf sample, we show how to persist the tracked shapes by saving the WKT (Well Known Text) to a file using the TrackEnded event. Also, you can see how to retrieve the WKT from files to create the features for the TrackShapeLayer of the TrackOverlay when loading the map. You will need the MapSuiteCore.dll and WpfDesktopEdition.dll references for this sample.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

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 for the details.

Screenshot

View this sample on Gitlab

Snap To Layer Sample for Wpf

The purpose of this Wpf project is to address some limitations of the class SnapToLayerEditInteractiveOverlay found in a previous sample Snap To Layer.

This class allowed the snapping of the mouse pointer to the closest vertex of a polygon if it is within a set tolerance. While this worked great for simple polygons, there was a performance limitation with complex polygons made of many vertices. This Wpf sample addresses this limitation and allows responsive dragging and snapping of vertex regardless of the size of polygon to snap to.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

MBTiles Extractor Sample for WPF

Description

The MBTiles Extractor allows you to create new smaller subsets from the MBTiles database. You simply specify the bounding box by tracking a rectangle shape on the map for the new area, then it will create a new SQLite database for that regions.

*.MBTile format can be supported in all of the Map Suite controls such as Wpf, Web, MVC, WebApi, Android and iOS.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

About the Code

The sample can extract MBTiles from source database to target database. One thing needs to be aware of: there are three tables (“map”,“images”,“metadata”) need to be copied from source database to target database.

ThinkGeoMBTilesLayer.CreateDatabase(targetFilePath);
var targetDBConnection = new SqliteConnection($"Data Source={targetFilePath}");
var targetMap = new Map(targetDBConnection);
var targetImages = new Images(targetDBConnection);
var targetMetadata = new Metadata(targetDBConnection);

var sourceDBConnection = new SqliteConnection("Data Source=Data/tiles_Frisco.mbtiles");
var sourceMap = new Map(sourceDBConnection);
var sourceImages = new Images(sourceDBConnection);
var sourceMetadata = new Metadata(sourceDBConnection);

sourceMetadata.NextPage();
foreach (MetadataEntry entry in sourceMetadata.Entries)
{
    if (entry.Name.Equals("center"))
    {
        PointShape centerPoint = projection.ConvertToExternalProjection(bbox).GetCenterPoint();
        entry.Value = $"{centerPoint.X},{centerPoint.Y},{maxZoom}";
    }
}
targetMetadata.Insert(sourceMetadata.Entries);

int recordLimit = 1000;
foreach (var tileRange in tileRanges)
{
    long offset = 0;
    bool isEnd = false;
    while (!isEnd)
    {
        string querySql = $"SELECT * FROM {sourceMap.TableName} WHERE " + ConvetToSqlString(tileRange) 
                            + $" LIMIT {offset},{recordLimit}";
        var entries = sourceMap.Query(querySql);
        targetMap.Insert(entries);

        if (entries.Count < recordLimit)
            isEnd = true;

        querySql = $"SELECT images.tile_data as tile_data, images.tile_id as tile_id FROM {sourceImages.TableName} "
                    + $WHERE images.tile_id IN ( SELECT {Map.TileIdColumnName} FROM {sourceMap.TableName} WHERE "
                    + ConvetToSqlString(tileRange) + $" LIMIT {offset},{recordLimit} )";
        entries = sourceImages.Query(querySql);
        targetImages.Insert(entries);

        offset = offset + recordLimit;
    }
}

Getting Help

About ThinkGeo

ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.

Weather Line Style Sample for Wpf

In this WPF sample, we learn how to extend LineStyle class to create a style for representing weather fronts, such as cold front, warm front, or occluded front for your weather maps. To achieve that styling a regular LineStyle is used for the front line itself. For symbolizing the type of front an icon is used.

Notice the two handy properties to give you more control: Spacing property to adjust the distance in screen coordinate between each symbol on the line, and Side property to control on what side of the line front the symbols should appear. Of course, as you zoom in and out on the map the spacing between each symbol remain the same as it is set in screen coordinate.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Display MsSql GeoDatabase Sample for Wpf

This sample demonstrates how you can read data from an MsSql database, and you will find the code as straightforward as consuming any other data source in Map Suite.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Use Wpf Map Control Sample for WinForms

The wpf map control supports multi-thread to render map, so it performs better than winforms map control. This sample demonstrates how you can use wpf map control in your winforms applications.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

ThinkGeo Cloud Color Sample for Wpf

This sample demonstrates how you can use ThinkGeo Cloud Client to get colors from ThinkGeo GIS Server. It supports 7 different colors: - Hue - Quality - Analogous - Complementary - Contrasting - Tetradic - Triadic

ThinkGeo Cloud Client support would work in all of the Map Suite controls such as Wpf, Web, MVC, WebApi, Android and iOS.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Popup and marker need to use click events etc, so they inherit Control class. SimpleMarkerOverlay and PopupOverlay can't be printed directly, and They need to be converted to image. This sample demonstrates how to print popup and marker by PrinterGeoCanvas.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Raster Layer Print Quality Sample for Wpf

This WPF project is the 3rd sample on the printing series. It demonstrates how to print your maps in high quality. This new feature for Map Suite is available in version 9.0.483.0 or later. From the sample you will better understand how to use DPI for handling print quality. The sample is based on raster images, but could also be used with vector data.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Custom Rotation Projection Sample for Wpf

In today’s project, we show how to create your own projection class that allows projecting a layer from any internal projection to any external while doing a rotation at the same time. Having the capability to apply those two operations in one step may come handy if the original layer was created in a different projection with the north at an angle and you want to align it on the base map.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Centering And Rotating Sample for Wpf

This project is the Wpf version of the services edition sample “Centering and Rotating On Moving Feature”, where we learn how to have the map always centered and rotated based on the location and direction of a moving vehicle. This issues addresses some issues you have to be aware of regarding both ShapeFileFeatureLayer and InMemoryFeatureLayer when applying rotation to the map.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Wrap Dateline Mode Sample for Wpf

In this Wpf project, we show a new property of Overlay, WrapDatelineMode. This property that allows to continuously pan west or east with world map was already available in the dev branch. This concept was shown in the previous sample “WrapDatelineMode”. Now it is fully supported in Map Suite 5 and you can see in this sample how the behavior for the map in both Decimal Degrees (Lat/Long) and Spherical Mercator (Google Map/Bing map projection). In order to run this sample, you will need the latest release for Wpf with references to MapSuiteCore.dll and WpfDesktopEdition.dll.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Map Loading Progress Sample for Wpf

Discover how to use progress bar to show the LayerOverlay rendering progress. The project is simple and meant to show only the basic logic; to extend it, you could add some other information or a loading image instead of a progress bar.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

ThinkGeo Cloud Geocoding Sample for Wpf

This Sample demonstrates how you can use ThinkGeo Cloud Client to get a geographic location from ThinkGeo GIS Server by a street address.

ThinkGeo Cloud Client support would work in all of the Map Suite controls such as Wpf, Web, MVC, WebApi, Android and iOS.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Select And Drag Feature Sample for Wpf

In this Wpf project, we show how to select a feature from a shapefile based on a column value using the GetFeaturesByColumnValue. We also show to setup the EditOverlay to give the user the ability to drag the selected feature. In this project, you can also see how to get the world coordinates at the mouse move event. Notice that the code for doing this is quite different in Wpf compared to the winforms edition.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Cad Viewer Sample for Wpf

Description

This sample demonstrates how you can read data from an CAD file(*.dwg, *.dxf) in your Map Suite GIS applications, and how to render it with CAD embedded style as well as a customized style. This Cad File support would work in all of the Map Suite controls such as Wpf, Web, MVC and WebApi.

Please refer to Wiki for the details.

Screenshot

### About the Code ```csharp CadFeatureLayer layer = new CadFeatureLayer(@“AppData\” + sampleFileListBox.SelectedItem.ToString()); layer.StylingType = CadStylingType.StandardStyling; layer.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.CreateSimpleLineStyle(GeoColor.SimpleColors.Black, 2, true); layer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = PointStyles.CreateSimplePointStyle(PointSymbolType.Circle, GeoColor.SimpleColors.Blue, 8); layer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.CreateSimpleAreaStyle(GeoColor.SimpleColors.Yellow); layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; ```

### Getting Help

[ThinkGeo Desktop for Wpf Wiki Resources](http://wiki.thinkgeo.com/wiki/thinkgeo_desktop_for_wpf)

[ThinkGeo Desktop for Wpf Product Description](https://thinkgeo.com/ui-controls#desktop-platforms)

[ThinkGeo Community Site](http://community.thinkgeo.com/)

[ThinkGeo Web Site](http://www.thinkgeo.com)

### About ThinkGeo

ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.

Image Style Sample for Wpf

Description

As you probably already know, using the Map Suite API, you can easily display a point-based feature as an image. But how do you do the same thing for a line or a polygon-based feature? In this WPF project, we show you how to create custom Image Styles for both line and polygon features. With the new ImageAreaStyle, you can display a polygon feature that uses an image as its fill. You can see how an image for forest and water is used in the sample project. And with the new ImageLineStyle, you can do the same thing with line features. You'll see how an image of a pavement texture is used to represent streets.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

About the Code

[Serializable]
class ImageAreaStyle : Style
{
    private GeoImage geoImage = null;

    public ImageAreaStyle(GeoImage geoImage)
    {
        this.geoImage = geoImage;
    }

    protected override void DrawCore(IEnumerable<Feature> features, GeoCanvas canvas, 
              Collection<SimpleCandidate> labelsInThisLayer, Collection<SimpleCandidate> labelsInAllLayers)
    {
        // Loop through all of the features being passed in to draw.
        foreach (Feature feature in features)
        {
            WellKnownType shapeWellKnownType = feature.GetWellKnownType();
            if (shapeWellKnownType == WellKnownType.Polygon)
            {
                PolygonShape polygonShape = new PolygonShape(feature.GetWellKnownBinary());
                canvas.DrawArea(polygonShape, new GeoTextureBrush(geoImage), DrawingLevel.LevelOne);
            }
            else if (shapeWellKnownType == WellKnownType.Multipolygon)
            {
                MultipolygonShape multiPolygonShape = new MultipolygonShape(feature.GetWellKnownBinary());
                canvas.DrawArea(multiPolygonShape, new GeoTextureBrush(geoImage), DrawingLevel.LevelOne);
            }
        }
    }
}

Getting Help

About ThinkGeo

ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.

Earthquake Statistics Sample for Wpf

Description

The Earthquake Statistics sample template is a statistical report system for earthquakes that have occurred in the past few years across the United States. It can help you generate infographics and analyze the severely afflicted areas, or used as supporting evidence when recommending measures to minimize the damage in future quakes.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

About the Code

GridInterpolationModel interpolationModel = new InverseDistanceWeightedGridInterpolationModel(3, double.MaxValue);
isoLineLayer = new DynamicIsoLineLayer(dataPoints, IsoLineLayer.GetIsoLineLevels(dataPoints.Values, 12), 
                                       interpolationModel, IsoLineType.ClosedLinesAsPolygons);

IsoLineLayer.GetIsoLineLevels(dataPoints, 12);

levelClassBreakStyle = new ClassBreakStyle(isoLineLayer.DataValueColumnName);
levelClassBreakStyle.ClassBreaks.Add(new ClassBreak(double.MinValue, 
                                     new AreaStyle(new GeoPen(GeoColor.FromHtml("#FE6B06"), 1), 
                                     new GeoSolidBrush(new GeoColor(100, levelAreaColors[0])))));

Getting Help

About ThinkGeo

ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.

ThinkGeo Cloud Elevation Sample for Wpf

This Sample demonstrates how you can use ThinkGeo Cloud Client to get elevation data from ThinkGeo GIS Server, and shows the elevation data of a road in the form of a line chart.

There are two ways to get the elevation data of the line. First, get the points on the line by setting the interval distance. The other, is to take the points by setting the number of points to be fetched. Then query the elevation data of the point.

ThinkGeo Cloud Client support would work in all of the Map Suite controls such as Wpf, Web, MVC, WebApi, Android and iOS.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Find Nearest Cross Streets Sample for Wpf

This sample demonstrates how to geocode an address using Map Suite Geocoder. It then returns and highlights the low and high cross streets.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Spatial Query With ThinkGeo Cloud Vector Maps Sample for Wpf

This sample demonstrates how you can query the features of Vector Tiles requested from ThinkGeo Cloud Services in your Map Suite GIS applications, such as searching the nearest places to your clicked place or the roads in the area with a specific distance you specified.

ThinkGeo Cloud Vector Maps support would work in all of the Map Suite controls such as Wpf, Web, MVC, WebApi, Android and iOS.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Find Shortest Line And Splitting Lines Sample for Wpf

This sample will show you how to find the closest line between two features by using the GetShortestLineTo API and how to split a line at a given point using the GetLineOnALine API. These APIs can be very useful when doing spatial analysis and editing of features. This sample also allows you to dynamically alter the test features using the EditOverlay so you can try out different scenarios and see the results quickly. A MapShapes layer is used to display and style the individual results.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Polygon Shapes To Multipolygon Shape Sample for Wpf

In this Wpf project, we show how to create a MultipolygonShape from various PolygonShapes. Since a collection of PolygonShapes cannot be directly cast to a MultipolygonShape, we show the technique to build a MultipolygonShape passing an IEnumerable of PolygonShape. This is a Wpf sample and you will need the references for MapSuiteCore.dll and WpfDesktopEdition.dll.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

World Map Kit Data Extractor Sample for Wpf

The World Map Kit Data Extractor allows you to create new smaller subsets from the World Map Kit SQLite master database. You simply specify the bounding box (or a shape file) for the new area then it will create a new SQLite database for that regions. There are options to preserve high level data allowing you to keep higher extent features, about 700 meg of data, such as the world, countries, high level roads etc. as a backdrop to the cut out area. If you choose not to preserve the high level data the tool crosscuts every layer leaving you with the smallest dataset possible. The tool works with multiple projections but does not re-project. Specifying the srid allows you to configure your bounding box in decimal degrees regardless of the source database projection. We will consider enhancing the tool to support projection based on feedback.

Please refer to Wiki for the details.

Screenshot

View this sample on Github

Connecting Two Shapes With Arraw Line Sample for Wpf

In this sample, two polygons are connected by a arrowline, and if the polygons are moved the connecting arrowline will be moved automatically as well.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Multiple Jpeg2000 Raster Layer Sample for Wpf

This sample shows how to create a customized raster layer for loading multiple files. In this project, we create the MultipleJpeg2000RasterLayer to inherit from Layer to load multiple .jp2 files. You can use the world files or a RectangleShape which is the extent of the image in world coordinate.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Use Custom Font Symbol With PointStyle for Wpf

Description

In this sample we show you how to use custom font symbol with pointStyle to your Map Suite applications for the WPF environment. The UseCustomFontSymbolWithPointStyle-ForWpf.NETCore sample supports ThinkGeo UI for Wpf 12.0 and higher.

Please refer to Wiki for the details.

Screenshot

### About the Code ```csharp ShapeFileFeatureLayer citiesLayer = new ShapeFileFeatureLayer(“AppData/MajorCities_3857.shp”); citiesLayer.Name = “MajorCities”; citiesLayer.ZoomLevelSet.ZoomLevel04.DefaultPointStyle = new PointStyle(

                                  new GeoFont("AppData/vectormap-icons.ttf", 20, DrawingFontStyles.Regular),
                                  "\ue0b5",new GeoSolidBrush(GeoColors.Red));

citiesLayer.ZoomLevelSet.ZoomLevel05.DefaultPointStyle = new PointStyle(

                                  new GeoFont("AppData/vectormap-icons.ttf", 25, DrawingFontStyles.Regular),
                                  "\ue05c",new GeoSolidBrush(GeoColors.Orange));

citiesLayer.ZoomLevelSet.ZoomLevel06.DefaultPointStyle = new PointStyle(

                                  new GeoFont("AppData/vectormap-icons.ttf", 28, DrawingFontStyles.Regular),
                                  "\ue078",new GeoSolidBrush(GeoColors.Green));

citiesLayer.ZoomLevelSet.ZoomLevel07.DefaultPointStyle = new PointStyle(

                                  new GeoFont("AppData/vectormap-icons.ttf", 30, DrawingFontStyles.Regular), 
                                  "\ue035",new GeoSolidBrush(GeoColors.DarkBlue));

citiesLayer.ZoomLevelSet.ZoomLevel08.DefaultPointStyle = new PointStyle(

                                  new GeoFont("AppData/vectormap-icons.ttf", 34, DrawingFontStyles.Regular),
                                  "\ue02e",new GeoSolidBrush(GeoColors.Blue));

citiesLayer.ZoomLevelSet.ZoomLevel09.DefaultPointStyle = new PointStyle(

                                  new GeoFont("AppData/vectormap-icons.ttf", 36, DrawingFontStyles.Regular), 
                                  "\ue06f",new GeoSolidBrush(GeoColors.Purple));

citiesLayer.ZoomLevelSet.ZoomLevel10.DefaultPointStyle = new PointStyle(

                                  new GeoFont("AppData/vectormap-icons.ttf", 40, DrawingFontStyles.Regular),
                                  "\ue084", new GeoSolidBrush(GeoColors.Red));

``` ### Getting Help

[ThinkGeo Desktop for Wpf Wiki Resources](http://wiki.thinkgeo.com/wiki/thinkgeo_desktop_for_wpf)

[ThinkGeo Desktop for Wpf Product Description](https://thinkgeo.com/ui-controls#desktop-platforms)

[ThinkGeo Community Site](http://community.thinkgeo.com/)

[ThinkGeo Web Site](http://www.thinkgeo.com)

### About ThinkGeo ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.

Render Point With TextStyle for Wpf

Description

In this sample we show you how to render points with textStyle in your WPF applications. It is using ThinkGeo Web Font which can be browsed/downloaded from Here. This sample uses ThinkGeo UI for Wpf 12.0.12 or higher.

TextStyle can render a point layer with font glyphs, it can also take advantage of the text confliction check to avoid duplication. PointClusterStyle can also be used to remove duplication, and [here](https://github.com/ThinkGeo/ClusterPointSample-ForWpf.NETCore) is a sample of it.

![Screenshot](https://github.com/ThinkGeo/RenderPointWithTextStyle-ForWpf.NETCore/blob/master/Screenshot.gif)

### About the Code The sample is rendering the points from FriscoSchools.shp. One thing needs to be aware of: Column name is required for grabbing the corresponding attributes for each record in the shapefile. Here we pass in a column (“textColumn”) which doesn't exist in the data, that raises CustomColumnFetch event in which we can simply return the glyph content we are going to draw for each feature.

```csharp

  ShapeFileFeatureLayer shapeFileFeatureLayer = new ShapeFileFeatureLayer("AppData/FriscoSchools.shp");
  // CustomColumnFetch event is raised every time the layer is fetching a column which doesn't exist. 
  // In this example as "textColumn" does not exist in the shape file, CustomColumnFetch event 
  // will be raised so give us a way to programmatically filling it in.  
  shapeFileFeatureLayer.FeatureSource.CustomColumnFetch += FeatureSource_CustomColumnFetch;
  // Use a font glyph to render a point. 
  // This font in the sample can be downloaded at https://thinkgeo.com/map-icons-webfont.
  GeoFont geoFont = new GeoFont("AppData/vectormap-icons.ttf", 20);
  TextStyle textStyle = new TextStyle("textColumn", geoFont, GeoBrushes.Yellow);
 
  // "textColumn" doesn't exist in the shape file, this is why CustomColumnFetch is raised.
  shapeFileFeatureLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(textStyle);
  shapeFileFeatureLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
  private void FeatureSource_CustomColumnFetch(object sender, CustomColumnFetchEventArgs e)
  {
      // "\ue0aa" is the school zone glyph content in ThinkGeo Web Font. 
      // Visit https://thinkgeo.com/map-icons-webfont and you can find more glyph icons from ThinkGeo. 
      e.ColumnValue = "\ue0aa";
  }

```

### Getting Help

[ThinkGeo Desktop for Wpf Wiki Resources](http://wiki.thinkgeo.com/wiki/thinkgeo_desktop_for_wpf)

[ThinkGeo Desktop for Wpf Product Description](https://thinkgeo.com/ui-controls#desktop-platforms)

[ThinkGeo Community Site](http://community.thinkgeo.com/)

[ThinkGeo Web Site](http://www.thinkgeo.com)

### About ThinkGeo ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.

Get Feature Clicked On With Projection Sample for Wpf

This WPF project shows a technique for finding the feature of a point, line or polygon-based layer that the user clicked on. As with the earlier sample entitled “Get Feature Clicked On”, in order to give the user the expected behavior, a buffer in screen coordinates needs to be set so that the selected feature is chosen within a constant distance in screen coordinates from where the user clicked on, regardless of the zoom level. In addition, this sample also addresses a limitation of the earlier sample by showing the contrast between using the functions GetFeaturesNearestTo and GetFeaturesWithinDistanceOf.

While the function GetFeaturesNearestTo as used in “Get Feature Clicked On” works quickly and is adequate in most cases, it is not guaranteed to get the closest feature. In contrast, with the new function GetFeaturesWithinDistanceOf, you can loop through the features within a specified tolerance and get their exact distance. While this approach requires some more code, it is guaranteed to get the closest feature in any case.

This sample also demonstrates another aspect of distance queries. We have the layers projected to the Google Map projection from WGS84, and you'll notice that the aforementioned distance functions (GetFeaturesWithinDistanceOf and GetFeaturesWithinDistanceOf) work seamlessly without requiring the developer to worry whether the layers are projected or not.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Apply DirectionPointStyle for LineStyle for Wpf

Description

The Map Suite WPF ApplyDirectionPointStyleForLineStyle sample will guide you to draw lineStyle's direction Point on map. The direction Point can be an image or a glyph, it not only rotates the icon accross the angle of the road, but also provides a way to customize the rotation of the direction point. The arrows highlighted in the red circle in the following screenshot are customized based on the line's attributes. Please check out the source for detail. This sample supports Map Suite 10.5.8 and higher.

Please refer to Wiki for the details.

Screenshot

About the Code

// Set up the line style with white inner pen and black center pen. 
var lineStyle = new LineStyle(new GeoPen(GeoColors.Black, 16) { StartCap = DrawingLineCap.Round, EndCap = DrawingLineCap.Round }, new GeoPen(GeoColors.White, 13) { StartCap = DrawingLineCap.Round, EndCap = DrawingLineCap.Round });
// Set up the required column name for the style. We will customize the line style based on this column value. 
lineStyle.RequiredColumnNames.Add("FENAME");
            
// Set up the style for Direction Point and set up the event for customization. 
lineStyle.DirectionPointStyle = new PointStyle(new GeoImage("AppData\\Arrow.png"));
lineStyle.DrawingDirectionPoint += LineStyle_DrawingPointStyle;
            
private void LineStyle_DrawingPointStyle(object sender, DrawingDirectionPointEventArgs e)
{
    // Customize the direction point for the line feature whose "FENAME" column equals to "Mo-Pac". 
    if (e.Line.ColumnValues["FENAME"] == "Mo-Pac")
    {
        e.RotationAngle = 0;
    }
}

Getting Help

About ThinkGeo

ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.

File Geo Database Viewer Sample for Wpf

Description

This sample demonstrates how you can read data from an ESRI FileGeodatabase, and you will find the code as straightforward as consuming any other data source in Map Suite.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

About the Code

Use a ClassBreakStyle to colorize each state differently depending on the range into which its population falls. This value is found in the states ShapeFile DBF in the column named “POP1990”.

       
layerOverlay = new LayerOverlay();
layer = new FileGeoDatabaseFeatureLayer(@"..\..\..\AppData\Shapes.gdb");
layer.FeatureSource.ProjectionConverter = new ProjectionConverter(4326, 3857);
layer.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = new LineStyle(new GeoPen(GeoColors.Green));
layer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = new PointStyle(PointSymbolType.Circle, 5, new GeoSolidBrush(GeoColors.Red));
layer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = new AreaStyle(new GeoPen(GeoColors.Black));
layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
layerOverlay.Layers.Add(layer);
mapView.Overlays.Add(layerOverlay);

Getting Help

About ThinkGeo

ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.

In this sample we show you how to add robust printing support to your Map Suite applications for the WPF. Using the code in this sample, you'll be able to build a Print Preview interface that lets your users interactively arrange items on a virtual page before printing the result to a printer, exporting to a PDF or to a bitmap image. The printing system also print maps with multi pages or print multi maps to one page.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Distance Query On Wrap Dateline Mode Sample for Wpf

This WPF sample shows how to take advantage of the projection class WrapDatelineProjection for doing spatial queries when on a “virtual map”. From this spatial query example, the developer should understand how the same principle using the same projection class can be applied for other operations such as Spatial Queries, Identify, etc.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Get Features From Arc GIS Server Sample for WPF

In this wpf-based project, it illustrates how to get the features from the ArcGIS Restful Server. On the left side of the screenshot shows the raster data from ArcGIS Server and on the other side shows the features from ArcGIS Restful Server. In order to run this project, you will need the Development Build 9.0.482.0 or later.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

ThinkGeo Cloud Vector Maps Sample for Wpf

This sample demonstrates how you can draw the map with Vector Tiles requested from ThinkGeo Cloud Services in your Map Suite GIS applications, with any style you want from StyleJSON (Mapping Definition Grammar). It will show you how to use the XyzFileBitmapTileCache and XyzFileVectorTileCache to improve the performance of map rendering. It supports have 3 built-in default map styles and more awasome styles from StyleJSON file you passed in, by 'Custom': - Light - Dark - TransparentBackground - Custom

ThinkGeo Cloud Vector Maps support would work in all of the Map Suite controls such as Wpf, Web, MVC, WebApi, Android and iOS.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

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 for the details.

Screenshot

View this sample on Gitlab

ThinkGeo Cloud Reverse Geocoding Sample for Wpf

This Sample demonstrates how you can use ThinkGeo Cloud Client to get meaningful addresses from ThinkGeo GIS Server by a geographic location. It ships with an optimized set of worldwide coverage of cities and towns, but any customized data can be supported as well.

ThinkGeo Cloud Client support would work in all of the Map Suite controls such as Wpf, Web, MVC, WebApi, Android and iOS.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

CustomZoomLevel for ThinkGeoCloudRasterOverlay for Wpf

Description

The Map Suite WPF CustomZoomLevelForThinkGeoCloudRasterOverlay sample will guide you to how to draw map with custom zoomlevels. This CustomZoomLevelForThinkGeoCloudRasterOverlay sample supports Map Suite 10.0.0.0 and higher and will show you how to create a WPF application using Map Suite WPF components.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

About the Code

ThinkGeoCloudMapsZoomLevelSet thinkGeoCloudMapsZoomLevelSet = new ThinkGeoCloudMapsZoomLevelSet();
ThinkGeoCloudMapsZoomLevelSet customZoomLevelSet = new ThinkGeoCloudMapsZoomLevelSet();
customZoomLevelSet.CustomZoomLevels.Clear();

customZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(thinkGeoCloudMapsZoomLevelSet.CustomZoomLevels[3].Scale));
customZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(thinkGeoCloudMapsZoomLevelSet.CustomZoomLevels[4].Scale));
customZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(thinkGeoCloudMapsZoomLevelSet.CustomZoomLevels[5].Scale));
customZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(thinkGeoCloudMapsZoomLevelSet.CustomZoomLevels[6].Scale));
customZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(thinkGeoCloudMapsZoomLevelSet.CustomZoomLevels[7].Scale));
customZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(thinkGeoCloudMapsZoomLevelSet.CustomZoomLevels[8].Scale));
customZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(thinkGeoCloudMapsZoomLevelSet.CustomZoomLevels[9].Scale));
customZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(thinkGeoCloudMapsZoomLevelSet.CustomZoomLevels[10].Scale));
customZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(thinkGeoCloudMapsZoomLevelSet.CustomZoomLevels[11].Scale));
customZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(thinkGeoCloudMapsZoomLevelSet.CustomZoomLevels[12].Scale));
customZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(thinkGeoCloudMapsZoomLevelSet.CustomZoomLevels[13].Scale));
customZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(thinkGeoCloudMapsZoomLevelSet.CustomZoomLevels[14].Scale));
customZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(thinkGeoCloudMapsZoomLevelSet.CustomZoomLevels[15].Scale));
customZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(thinkGeoCloudMapsZoomLevelSet.CustomZoomLevels[16].Scale));
customZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(thinkGeoCloudMapsZoomLevelSet.CustomZoomLevels[17].Scale));
customZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(thinkGeoCloudMapsZoomLevelSet.CustomZoomLevels[18].Scale));
customZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(thinkGeoCloudMapsZoomLevelSet.CustomZoomLevels[19].Scale));

double zoomlevel17Scale = thinkGeoCloudMapsZoomLevelSet.CustomZoomLevels[19].Scale;
customZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(zoomlevel17Scale / 2));
customZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(zoomlevel17Scale / 4));
customZoomLevelSet.CustomZoomLevels.Add(new ZoomLevel(zoomlevel17Scale / 8));

Getting Help

About ThinkGeo

ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.

Display Wms Raster Layer Sample for WinForms

This sample demonstrates how you use WmsRasterLayer to render wms server in your Map Suite GIS applications. This WmsRasterLayer support would work in all of the Map Suite controls such as Wpf, Web, MVC and WebApi.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

ThinkGeo Cloud Maps Sample for Android

This sample demonstrates how you can display ThinkGeo Cloud Maps in your Map Suite GIS applications. It will show you how to use the XYZFileBitmapTileCache to improve the performance of map rendering. ThinkGeoCloudMapsOverlay uses the ThinkGeo Cloud XYZ Tile Server as raster map tile server. It supports 5 different map styles: - Light - Dark - Aerial - Hybrid - TransparentBackground

ThinkGeo Cloud Maps support would work in all of the Map Suite controls such as Wpf, WinForms, Web, MVC, WebApi and iOS.

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

Screenshot

View this sample on Github

ThinkGeo Cloud Maps Sample for iOS

This sample demonstrates how you can display ThinkGeo Cloud Maps in your Map Suite GIS applications. It will show you how to use the XYZFileBitmapTileCache to improve the performance of map rendering. ThinkGeoCloudMapsOverlay uses the ThinkGeo Cloud XYZ Tile Server as raster map tile server. It supports 5 different map styles: - Light - Dark - Aerial - Hybrid - TransparentBackground

ThinkGeo Cloud Maps support would work in all of the Map Suite controls such as Wpf, WinForms, Web, MVC, WebApi and Android.

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

Screenshot

View this sample on Github

ThinkGeo Cloud Maps Sample for WebForms

This sample demonstrates how you can display ThinkGeo Cloud Maps in your Map Suite GIS applications. It will show you how to use the XYZFileBitmapTileCache to improve the performance of map rendering. ThinkGeoCloudMapsOverlay uses the ThinkGeo Cloud XYZ Tile Server as raster map tile server. It supports 5 different map styles: - Light - Dark - Aerial - Hybrid - TransparentBackground

ThinkGeo Cloud Maps support would work in all of the Map Suite controls such as Wpf, Web, MVC, WebApi, Android and iOS.

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

Screenshot

View this sample on Github

ThinkGeo Cloud Maps Sample for WinForms

This sample demonstrates how you can display ThinkGeo Cloud Maps in your Map Suite GIS applications. It will show you how to use the XYZFileBitmapTileCache to improve the performance of map rendering. ThinkGeoCloudMapsOverlay uses the ThinkGeo Cloud XYZ Tile Server as raster map tile server. It supports 5 different map styles: - Light - Dark - Aerial - Hybrid - TransparentBackground

ThinkGeo Cloud Maps support would work in all of the Map Suite controls such as Wpf, Web, MVC, WebApi, Android and iOS.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

ThinkGeo Cloud Maps Sample for Mvc

This sample demonstrates how you can display ThinkGeo Cloud Maps in your Map Suite GIS applications. It will show you how to use the XYZFileBitmapTileCache to improve the performance of map rendering. ThinkGeoCloudMapsOverlay uses the ThinkGeo Cloud XYZ Tile Server as raster map tile server. It supports 5 different map styles: - Light - Dark - Aerial - Hybrid - TransparentBackground

ThinkGeo Cloud Maps support would work in all of the Map Suite controls such as Wpf, WinForms, Web, WebApi, Android and iOS.

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

Screenshot

View this sample on Github

Display ThinkGeo Cloud Maps Sample for JavaScript

This sample demonstrates how you can display ThinkGeo Cloud Maps in a web page using javascript. It supports 5 different map styles: - Light - Dark - Aerial - Hybrid - TransparentBackground

ThinkGeo Cloud Maps works in all of the Map Suite controls such as Wpf, WinForms, Web, Android and iOS.

Screenshot

View this sample on Github


Quickstart Sample for WebApi

The Map Suite WebAPI illustrated QuickStart Guide will guide you through the process of creating a sample application and will help you become familiar with Map Suite. This edition of the QuickStart Guide supports Map Suite WebAPI 10.0.0.0 and higher and will show you how to create a ASP.NET WebAPI application using this product.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Quickstart Sample for WebApi .NetCore

Description

The guide will show you through the process of creating a sample of WebAPI application for rendering a shapefile with ThinkGeo.UI.WebApi and will help you become familiar with ThinkGeo Products. The Quickstart Guide supports ThinkGeo UI for WebApi 12.0 and higher.

Please refer to Wiki for the details.

![Screenshot](https://github.com/ThinkGeo/QuickstartSample-ForWebApi.NetCore/blob/master/Screenshot.png)

About the Code

API

First, we need to create an API for reponding the getting tile requests. The code snippet shows like below:

    [ApiController]
    [Route("")]
    public class DefaultController : ControllerBase
    {
        [Route("tile/{z}/{x}/{y}")]
        public IActionResult GetMapTile(int z, long x, long y)
        {
            // Create the LayerOverlay for displaying the map.
            var countriesLayer = new ShapeFileFeatureLayer(Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "AppData", "Countries.shp"));

            // Set the style for ZoomLevels.
            countriesLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = new AreaStyle
            {
                FillBrush = new GeoSolidBrush(GeoColor.FromArgb(255, 233, 232, 214)),
                OutlinePen = new GeoPen(GeoColors.Gray, 1)
            };
            countriesLayer.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = new TextStyle("CNTRY_NAME", new GeoFont("Arial", 10), GeoBrushes.Black);
            // Apply the zoom level's style to zoom level 20.
            countriesLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;

            // Apply ProjectionConverter. The source is in DecimalDegree and needs to be convert to Mercator Projection.
            countriesLayer.FeatureSource.ProjectionConverter = new ProjectionConverter(4326, 3857);

            // Initialize a LayerOverlay.
            var layerOverlay = new LayerOverlay();
            layerOverlay.Layers.Add(countriesLayer);
            return DrawTileImage(layerOverlay, z, x, y);
        }

        private IActionResult DrawTileImage(LayerOverlay layerOverlay, int z, long x, long y)
        {
            // Create a new GeoImage
            using (GeoImage image = new GeoImage(256, 256))
            {
                var geoCanvas = GeoCanvas.CreateDefaultGeoCanvas();

                // Get the BoundingBox for the specified x, y, z.
                RectangleShape boundingBox = WebApiExtentHelper.GetBoundingBoxForXyz(x, y, z, GeographyUnit.Meter);
                geoCanvas.BeginDrawing(image, boundingBox, GeographyUnit.Meter);

                if (layerOverlay != null)
                {
                    layerOverlay.Draw(geoCanvas);
                }
                geoCanvas.EndDrawing();

                return File(image.GetImageBytes(), "image/png");
            }
        }
    }

Client Side

Now we need to create a client side to consume the API, in this sample, we use OpenLayers v6.0.1.

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>QuickStart</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <meta name="author" content="ThinkGeo" />
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.0.1/css/ol.css" type="text/css">
    <style>
        #map {
            height: 600px;
            width: 800px;
        }
    </style>
</head>
<body>
    <div id="map">
    </div>
    <script src="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.0.1/build/ol.js"></script>
    <script>
        var map = new ol.Map({
            target: 'map',
            layers: [
                new ol.layer.Tile({
                    source: new ol.source.XYZ({
                        url: '/tile/{z}/{x}/{y}'
                    })
                })
            ],
            view: new ol.View({
                center: [-472202, 5009377.08569731],
                zoom: 1
            })
        });
    </script>
</body>
</html>

Getting Help

About ThinkGeo

ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.

Display Cad File Sample for WinForms

This sample demonstrates how you can read data from an CAD file(*.dwg, *.dxf) in your Map Suite GIS applications, and how to render it with CAD embedded style as well as a customized style. This Cad File support would work in all of the Map Suite controls such as Wpf, Web, MVC and WebApi.

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

Screenshot

View this sample on Github

Layers Sample for WebApi

This sample shows the different types of layers and data formats you can use to build up your map.

Screenshot

View this sample on Gitlab

Display Nautical Charts Sample for WebApi

This sample shows how you can use Map Suite WebAPI Edition to display nautical charts in your web application.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

ThinkGeo Cloud Vector Maps Sample for WebApi

This sample demonstrates how you can draw the map with Vector Tiles requested from ThinkGeo Cloud Services in your Map Suite GIS applications, with any style you want from StyleJSON (Mapping Definition Grammar). It will show you how to use the XyzFileBitmapTileCache and XyzFileVectorTileCache to improve the performance of map rendering. It supports 3 built-in default map styles and more awasome styles from StyleJSON file you passed in, by 'Custom': - Light - Dark - TransparentBackground - Custom

ThinkGeo Cloud Vector Maps support would work in all of the Map Suite controls such as Wpf, Web, MVC, WebApi, Android and iOS.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Getting Started Sample for WebApi

This sample shows you how to get started building your first application with the Map Suite WebAPI Edition.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Site Selection Sample for WebApi

This sample template allows you to view, understand, interpret, and visualize spatial data in many ways that reveal relationships, patterns, and trends. In this example, the user can apply the features of GIS to analyze spatial data to efficiently choose a suitable site for a new retail outlet.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Routing Data Explorer Sample for Wpf

This is a simple routing data viewer sample viewer which demonstrates how to use the RoutingEngine to get the shortest or fastest route in your Map Suite GIS applications.

How to use this tool:

1. Load rtg data:  Click menu “File→Load” browse to a rtg file. You also require a shapefile for the routing source file in the same folder, otherwise it display message “Could not find shp file in the same folder where you seleted”. 2. Start routing:

Use left click for a start point and right click for an end point. If there is no route within **200** meters(you can modify this in source code), the explorer displays a message "There’s no road within 200 meters to where you clicked on".   

This RoutingEngine supports routing in all of the Map Suite controls such as WinForms, Web, MVC and WebApi.

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

Screenshot

View this sample on Github

Display Wms Raster Layer Sample for WinForms

This sample demonstrates how you use WmsRasterLayer to render wms server in your Map Suite GIS applications. This WmsRasterLayer support would work in all of the Map Suite controls such as Wpf, Web, MVC and WebApi.

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

Screenshot

View this sample on Github

Hello World Sample for WebApi

This sample shows you how to get started building your first application with the Map Suite Web for WebApi 10.0.0.

Please refer to Wiki for the details.

Screenshot

View this sample on Github

Select Feature By Click Sample for WebApi

The purpose of this project is to show the technique for finding the feature the user clicked on. To give the user the expected behavior, a buffer in screen coordinates needs to be set so that the feature gets selected within a constant distance in screen coordinates to where the user clicked, regardless of the zoom level.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Building 3D JS Sample for WebApi

This project shows to create a simulated 3D buildings and use world map kit server as background map.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Query Tools Sample for WebApi

This sample shows the different ways you can query your data.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Display ThinkGeo Cloud Maps Sample for JavaScript

This sample demonstrates how you can display ThinkGeo Cloud Maps in a web page using javascript. It supports 5 different map styles: - Light - Dark - Aerial - Hybrid - TransparentBackground

ThinkGeo Cloud Maps works in all of the Map Suite controls such as Wpf, WinForms, Web, Android and iOS.

Screenshot

View this sample on Github # HowDoISample-ForWebAPI

### Description

The “How Do I?” samples collection is a comprehensive set containing dozens of interactive samples. Available in C# (WebAPI), these samples are designed to hit all the highlights of ThinkGeo WebAPI UIs, from simply adding a layer to a map to performing vehicle tracking and applying a thematic style. Consider this collection your “encyclopedia” of all the ThinkGeo basics and a great starting place for new users.

Please refer to [ThinkGeo Web UI for WebAPI](https://thinkgeo.com/gis-ui-web) for the details.

![Screenshot](https://github.com/ThinkGeo/HowDoISample-ForWebAPI/blob/master/Screenshot.gif)

### About the Code Backgrounds for this sample are powered by ThinkGeo WebAPI Maps samples, please refer to [Online Sample](https://samples.thinkgeo.com/webapi/) for more details, in each sample, you can click the “View Source” button in the upper-right corner to get the sample code, Also here is [an entrance](https://gitlab.com/thinkgeo/public/thinkgeo-web-maps/-/tree/master/samples/web-api) for source code list.

### FAQ - Q: How do I make background map work? A: Backgrounds for this sample are powered by ThinkGeo Cloud Maps and require a Client ID and Secret. These were sent to you via email when you signed up with ThinkGeo, or you can register now at https://cloud.thinkgeo.com. Once you get them, please update the code in property ApiKey=“” in RazorControl partial classes.

### Getting Help

[ThinkGeo Community Site](https://community.thinkgeo.com)

[ThinkGeo Web Site](https://www.thinkgeo.com)

### About ThinkGeo ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.

Adornments Sample for WebApi

Learn how to add legends, scale bars, directional arrows, and many more adornments to your map.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Projection Sample for WebApi

Learn about Map Projection and how to apply it to your data.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Basic Styling Sample for WebApi

This sample shows you how to apply basic styles to render your vector data layers.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Labeling Sample for WebApi

This sample shows you how to examine different labeling techniques to make your maps informative.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Drawing And Editing Sample for WebApi

This sample demonstrates how to implement drawing and editing shapes into your web application.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Visualization Sample for WebApi

This sample shows you how to explore the different styles available to help you analyze and visualize your data.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Marker And Popup Sample for WebApi

This sample shows you how to make your maps more interactive by using Markers and Popups.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Topology Validation Sample for WebApi

This sample shows simple ways to validate topology rules.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Overlays Sample for WebApi

Discover how to use Overlays to build up your map, or to add existing basemaps to your application.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Printing Sample for WebApi

A demonstration of how to use printing with map suite that can be added to your projects.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

ThinkGeo Cloud Maps Sample for Wpf

This sample demonstrates how you can display ThinkGeo Cloud Maps in your Map Suite GIS applications. It will show you how to use the XYZFileBitmapTileCache to improve the performance of map rendering. ThinkGeoCloudMapsOverlay uses the ThinkGeo Cloud XYZ Tile Server as raster map tile server. It supports 5 different map styles: - Light - Dark - Aerial - Hybrid - TransparentBackground

ThinkGeo Cloud Maps support would work in all of the Map Suite controls such as Wpf, Web, MVC, WebApi, Android and iOS.

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

Screenshot

View this sample on Github

Geometric Functions Sample for WebApi

This sample shows how to explore all the different APIs for Geometric Functions.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Cad Viewer Sample for Wpf

Description

This sample demonstrates how you can read data from an CAD file(*.dwg, *.dxf) in your Map Suite GIS applications, and how to render it with CAD embedded style as well as a customized style. This Cad File support would work in all of the Map Suite controls such as Wpf, Web, MVC and WebApi.

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

![Screenshot](https://github.com/ThinkGeo/CadViewerSample-ForWpf.NETCore/blob/master/Screenshot.png)

### About the Code ```csharp CadFeatureLayer layer = new CadFeatureLayer(@“AppData\” + sampleFileListBox.SelectedItem.ToString()); layer.StylingType = CadStylingType.StandardStyling; layer.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.CreateSimpleLineStyle(GeoColor.SimpleColors.Black, 2, true); layer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = PointStyles.CreateSimplePointStyle(PointSymbolType.Circle, GeoColor.SimpleColors.Blue, 8); layer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.CreateSimpleAreaStyle(GeoColor.SimpleColors.Yellow); layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; ```

### Getting Help

[ThinkGeo Desktop for Wpf Wiki Resources](http://wiki.thinkgeo.com/wiki/thinkgeo_desktop_for_wpf)

[ThinkGeo Desktop for Wpf Product Description](https://thinkgeo.com/ui-controls#desktop-platforms)

[ThinkGeo Community Site](http://community.thinkgeo.com/)

[ThinkGeo Web Site](http://www.thinkgeo.com)

### About ThinkGeo

ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.

ThinkGeo Cloud Maps Sample for Android

This sample demonstrates how you can display ThinkGeo Cloud Maps in your Map Suite GIS applications. It will show you how to use the XYZFileBitmapTileCache to improve the performance of map rendering. ThinkGeoCloudMapsOverlay uses the ThinkGeo Cloud XYZ Tile Server as raster map tile server. It supports 5 different map styles: - Light - Dark - Aerial - Hybrid - TransparentBackground

ThinkGeo Cloud Maps support would work in all of the Map Suite controls such as Wpf, WinForms, Web, MVC, WebApi and iOS.

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

Screenshot

View this sample on Github

ThinkGeo Cloud Maps Sample for WebForms

This sample demonstrates how you can display ThinkGeo Cloud Maps in your Map Suite GIS applications. It will show you how to use the XYZFileBitmapTileCache to improve the performance of map rendering. ThinkGeoCloudMapsOverlay uses the ThinkGeo Cloud XYZ Tile Server as raster map tile server. It supports 5 different map styles: - Light - Dark - Aerial - Hybrid - TransparentBackground

ThinkGeo Cloud Maps support would work in all of the Map Suite controls such as Wpf, Web, MVC, WebApi, Android and iOS.

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

Screenshot

View this sample on Github

ThinkGeo Cloud Reverse Geocoding Sample for Wpf

This Sample demonstrates how you can use ThinkGeo Cloud Client to get meaningful addresses from ThinkGeo GIS Server by a geographic location. It ships with an optimized set of worldwide coverage of cities and towns, but any customized data can be supported as well.

ThinkGeo Cloud Client support would work in all of the Map Suite controls such as Wpf, Web, MVC, WebApi, Android and iOS.

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

Screenshot

View this sample on Github

ThinkGeo Cloud Maps Sample for iOS

This sample demonstrates how you can display ThinkGeo Cloud Maps in your Map Suite GIS applications. It will show you how to use the XYZFileBitmapTileCache to improve the performance of map rendering. ThinkGeoCloudMapsOverlay uses the ThinkGeo Cloud XYZ Tile Server as raster map tile server. It supports 5 different map styles: - Light - Dark - Aerial - Hybrid - TransparentBackground

ThinkGeo Cloud Maps support would work in all of the Map Suite controls such as Wpf, WinForms, Web, MVC, WebApi and Android.

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

Screenshot

View this sample on Github

ThinkGeo Cloud Maps Sample for Mvc

This sample demonstrates how you can display ThinkGeo Cloud Maps in your Map Suite GIS applications. It will show you how to use the XYZFileBitmapTileCache to improve the performance of map rendering. ThinkGeoCloudMapsOverlay uses the ThinkGeo Cloud XYZ Tile Server as raster map tile server. It supports 5 different map styles: - Light - Dark - Aerial - Hybrid - TransparentBackground

ThinkGeo Cloud Maps support would work in all of the Map Suite controls such as Wpf, WinForms, Web, WebApi, Android and iOS.

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

Screenshot

View this sample on Github

ThinkGeo Cloud Maps Sample for WinForms

This sample demonstrates how you can display ThinkGeo Cloud Maps in your Map Suite GIS applications. It will show you how to use the XYZFileBitmapTileCache to improve the performance of map rendering. ThinkGeoCloudMapsOverlay uses the ThinkGeo Cloud XYZ Tile Server as raster map tile server. It supports 5 different map styles: - Light - Dark - Aerial - Hybrid - TransparentBackground

ThinkGeo Cloud Maps support would work in all of the Map Suite controls such as Wpf, Web, MVC, WebApi, Android and iOS.

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

Screenshot

View this sample on Github

ThinkGeo Cloud Geocoding Sample for Wpf

This Sample demonstrates how you can use ThinkGeo Cloud Client to get a geographic location from ThinkGeo GIS Server by a street address.

ThinkGeo Cloud Client support would work in all of the Map Suite controls such as Wpf, Web, MVC, WebApi, Android and iOS.

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

Screenshot

View this sample on Github

ThinkGeo Cloud Elevation Sample for Wpf

This Sample demonstrates how you can use ThinkGeo Cloud Client to get elevation data from ThinkGeo GIS Server, and shows the elevation data of a road in the form of a line chart.

There are two ways to get the elevation data of the line. First, get the points on the line by setting the interval distance. The other, is to take the points by setting the number of points to be fetched. Then query the elevation data of the point.

ThinkGeo Cloud Client support would work in all of the Map Suite controls such as Wpf, Web, MVC, WebApi, Android and iOS.

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

Screenshot

View this sample on Github


Quickstart Sample for Mvc

The Map Suite MVC QuickStart Guide will guide you through the process of creating a sample application and will help you become familiar with Map Suite. The QuickStart Guide supports Map Suite 10.0.0.0 and higher and will show you how to create an ASP.NET MVC application.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Vehicle Tracking Sample for Mvc

The Vehicle Tracking sample template gives you a head start on your next tracking project. With a working code example to draw from, you can spend more of your time implementing the features you care about and less time thinking about how to accomplish the basic functionality of a tracking system.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Display Cad File Sample for WinForms

This sample demonstrates how you can read data from an CAD file(*.dwg, *.dxf) in your Map Suite GIS applications, and how to render it with CAD embedded style as well as a customized style. This Cad File support would work in all of the Map Suite controls such as Wpf, Web, MVC and WebApi.

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

Screenshot

View this sample on Github

Hello World Sample for Mvc

This sample shows you how to get started building your first application with the Map Suite Web for Mvc 10.0.0.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

How Do I Sample for Mvc

The “How Do I?” samples collection is a comprehensive set containing a lot of interactive samples.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Site Selection Sample for Mvc

The Site Selection sample template allows you to view, understand, interpret, and visualize spatial data in many ways that reveal relationships, patterns, and trends. In the example illustrated, the user can apply the features of GIS to analyze spatial data to efficiently choose a suitable site for a new retail outlet.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Us Demographic Map Sample for Mvc

The Demographic and Lifestyle sample template gives you a head start on your statistics project, which includes details about race, age, gender, land usage, and more for all the states in U.S. The template contains pre-styled layers that can be used as-is, or as the foundation for adding your own map notes and layers.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Us Earthquake Statistics Sample for Mvc

The Earthquake Statistics sample template is a statistical report system for earthquakes that have occurred in the past few years across the United States. It can help you generate infographics and analyze the severely afflicted areas, or used as supporting evidence when recommending measures to minimize the damage in future quakes.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

ThinkGeo Cloud Maps Sample for Mvc

This sample demonstrates how you can display ThinkGeo Cloud Maps in your Map Suite GIS applications. It will show you how to use the XYZFileBitmapTileCache to improve the performance of map rendering. ThinkGeoCloudMapsOverlay uses the ThinkGeo Cloud XYZ Tile Server as raster map tile server. It supports 5 different map styles: - Light - Dark - Aerial - Hybrid - TransparentBackground

ThinkGeo Cloud Maps support would work in all of the Map Suite controls such as Wpf, WinForms, Web, WebApi, Android and iOS.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Routing Data Explorer Sample for Wpf

This is a simple routing data viewer sample viewer which demonstrates how to use the RoutingEngine to get the shortest or fastest route in your Map Suite GIS applications.

How to use this tool:

1. Load rtg data:  Click menu “File→Load” browse to a rtg file. You also require a shapefile for the routing source file in the same folder, otherwise it display message “Could not find shp file in the same folder where you seleted”. 2. Start routing:

Use left click for a start point and right click for an end point. If there is no route within **200** meters(you can modify this in source code), the explorer displays a message "There’s no road within 200 meters to where you clicked on".   

This RoutingEngine supports routing in all of the Map Suite controls such as WinForms, Web, MVC and WebApi.

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

Screenshot

View this sample on Github

Display Wms Raster Layer Sample for WinForms

This sample demonstrates how you use WmsRasterLayer to render wms server in your Map Suite GIS applications. This WmsRasterLayer support would work in all of the Map Suite controls such as Wpf, Web, MVC and WebApi.

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

Screenshot

View this sample on Github

ThinkGeo Cloud Maps Sample for Wpf

This sample demonstrates how you can display ThinkGeo Cloud Maps in your Map Suite GIS applications. It will show you how to use the XYZFileBitmapTileCache to improve the performance of map rendering. ThinkGeoCloudMapsOverlay uses the ThinkGeo Cloud XYZ Tile Server as raster map tile server. It supports 5 different map styles: - Light - Dark - Aerial - Hybrid - TransparentBackground

ThinkGeo Cloud Maps support would work in all of the Map Suite controls such as Wpf, Web, MVC, WebApi, Android and iOS.

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

Screenshot

View this sample on Github # Cad Viewer Sample for Wpf

### Description

This sample demonstrates how you can read data from an CAD file(*.dwg, *.dxf) in your Map Suite GIS applications, and how to render it with CAD embedded style as well as a customized style. This Cad File support would work in all of the Map Suite controls such as Wpf, Web, MVC and WebApi.

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

![Screenshot](https://github.com/ThinkGeo/CadViewerSample-ForWpf.NETCore/blob/master/Screenshot.png)

### About the Code ```csharp CadFeatureLayer layer = new CadFeatureLayer(@“AppData\” + sampleFileListBox.SelectedItem.ToString()); layer.StylingType = CadStylingType.StandardStyling; layer.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyles.CreateSimpleLineStyle(GeoColor.SimpleColors.Black, 2, true); layer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = PointStyles.CreateSimplePointStyle(PointSymbolType.Circle, GeoColor.SimpleColors.Blue, 8); layer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.CreateSimpleAreaStyle(GeoColor.SimpleColors.Yellow); layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20; ```

### Getting Help

[ThinkGeo Desktop for Wpf Wiki Resources](http://wiki.thinkgeo.com/wiki/thinkgeo_desktop_for_wpf)

[ThinkGeo Desktop for Wpf Product Description](https://thinkgeo.com/ui-controls#desktop-platforms)

[ThinkGeo Community Site](http://community.thinkgeo.com/)

[ThinkGeo Web Site](http://www.thinkgeo.com)

### About ThinkGeo

ThinkGeo is a GIS (Geographic Information Systems) company founded in 2004 and located in Frisco, TX. Our clients are in more than 40 industries including agriculture, energy, transportation, government, engineering, software development, and defense.

ThinkGeo Cloud Maps Sample for Android

This sample demonstrates how you can display ThinkGeo Cloud Maps in your Map Suite GIS applications. It will show you how to use the XYZFileBitmapTileCache to improve the performance of map rendering. ThinkGeoCloudMapsOverlay uses the ThinkGeo Cloud XYZ Tile Server as raster map tile server. It supports 5 different map styles: - Light - Dark - Aerial - Hybrid - TransparentBackground

ThinkGeo Cloud Maps support would work in all of the Map Suite controls such as Wpf, WinForms, Web, MVC, WebApi and iOS.

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

Screenshot

View this sample on Github

ThinkGeo Cloud Maps Sample for WebForms

This sample demonstrates how you can display ThinkGeo Cloud Maps in your Map Suite GIS applications. It will show you how to use the XYZFileBitmapTileCache to improve the performance of map rendering. ThinkGeoCloudMapsOverlay uses the ThinkGeo Cloud XYZ Tile Server as raster map tile server. It supports 5 different map styles: - Light - Dark - Aerial - Hybrid - TransparentBackground

ThinkGeo Cloud Maps support would work in all of the Map Suite controls such as Wpf, Web, MVC, WebApi, Android and iOS.

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

Screenshot

View this sample on Github

ThinkGeo Cloud Reverse Geocoding Sample for Wpf

This Sample demonstrates how you can use ThinkGeo Cloud Client to get meaningful addresses from ThinkGeo GIS Server by a geographic location. It ships with an optimized set of worldwide coverage of cities and towns, but any customized data can be supported as well.

ThinkGeo Cloud Client support would work in all of the Map Suite controls such as Wpf, Web, MVC, WebApi, Android and iOS.

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

Screenshot

View this sample on Github

ThinkGeo Cloud Maps Sample for iOS

This sample demonstrates how you can display ThinkGeo Cloud Maps in your Map Suite GIS applications. It will show you how to use the XYZFileBitmapTileCache to improve the performance of map rendering. ThinkGeoCloudMapsOverlay uses the ThinkGeo Cloud XYZ Tile Server as raster map tile server. It supports 5 different map styles: - Light - Dark - Aerial - Hybrid - TransparentBackground

ThinkGeo Cloud Maps support would work in all of the Map Suite controls such as Wpf, WinForms, Web, MVC, WebApi and Android.

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

Screenshot

View this sample on Github

ThinkGeo Cloud Maps Sample for WinForms

This sample demonstrates how you can display ThinkGeo Cloud Maps in your Map Suite GIS applications. It will show you how to use the XYZFileBitmapTileCache to improve the performance of map rendering. ThinkGeoCloudMapsOverlay uses the ThinkGeo Cloud XYZ Tile Server as raster map tile server. It supports 5 different map styles: - Light - Dark - Aerial - Hybrid - TransparentBackground

ThinkGeo Cloud Maps support would work in all of the Map Suite controls such as Wpf, Web, MVC, WebApi, Android and iOS.

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

Screenshot

View this sample on Github

ThinkGeo Cloud Geocoding Sample for Wpf

This Sample demonstrates how you can use ThinkGeo Cloud Client to get a geographic location from ThinkGeo GIS Server by a street address.

ThinkGeo Cloud Client support would work in all of the Map Suite controls such as Wpf, Web, MVC, WebApi, Android and iOS.

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

Screenshot

View this sample on Github

ThinkGeo Cloud Elevation Sample for Wpf

This Sample demonstrates how you can use ThinkGeo Cloud Client to get elevation data from ThinkGeo GIS Server, and shows the elevation data of a road in the form of a line chart.

There are two ways to get the elevation data of the line. First, get the points on the line by setting the interval distance. The other, is to take the points by setting the number of points to be fetched. Then query the elevation data of the point.

ThinkGeo Cloud Client support would work in all of the Map Suite controls such as Wpf, Web, MVC, WebApi, Android and iOS.

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

Screenshot

View this sample on Github


Quickstart Sample for WebForms

The Map Suite Web QuickStart Guide will guide you through the process of creating a sample application and will help you become familiar with Map Suite.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Create Sublayers Sample for WebForms

This sample shows you how to use FeatureSource to implement sublayer fuctions.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Hello World Sample for WebForms

This sample shows you how to get started building your first application with the Map Suite Web for WebForms 10.0.0.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Display Map By Specified Boundary Sample for WebForms

This sample shows how to display map by specified boundary. It shows how to cancel a request based on its extent to improve performance.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Us Demographic Map Sample for WebForms

The Demographic and Lifestyle sample template gives you a head start on your statistics project, which includes details about race, age, gender, land usage, and more for all the states in U.S. The template contains pre-styled layers that can be used as-is, or as the foundation for adding your own map notes and layers.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Geocoding Sample for WebForms

Sample Data Download

The Map Suite Geocoder “How Do I?” solution offers a series of useful how-to examples for using the Map Suite Geocoder component. The bundled solution comes with a small set of sample data from Chicago, IL and demonstrates geocoding, reverse geocoding, batch geocoding, use of fuzzy matching logic, getting the closest street number to a point, and much more. Full source code is included in both C# and VB.NET languages; simply select your preferred language to download the associated solution.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

RoutingSample-ForWebForms

Sample Data Download

The Map Suite Routing “How Do I?” solution offers a series of useful how-to examples for using the Map Suite Routing extension. The bundled solution comes with a small set of routable street data from Austin, TX and demonstrates simple routing, avoiding specific areas, getting turn-by-turn directions, optimizing for the Traveling Salesman Problem, and much more. Full source code is included in both C# and VB.NET languages; simply select your preferred language to download the associated solution.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Ajax Vehicle Tracking Sample for WebForms

The Ajax Vehicle Tracking sample template gives you a head start on your next ajax tracking project. With a working code example to draw from, you can spend more of your time implementing the features you care about and less time thinking about how to accomplish the basic functionality of a ajax tracking system.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Vehicle Tracking Sample for WebForms

The Vehicle Tracking sample template gives you a head start on your next tracking project. With a working code example to draw from, you can spend more of your time implementing the features you care about and less time thinking about how to accomplish the basic functionality of a tracking system.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Us Earthquake Statistics Sample for WebForms

The Earthquake Statistics sample template is a statistical report system for earthquakes that have occurred in the past few years across the United States. It can help you generate infographics and analyze the severely afflicted areas, or used as supporting evidence when recommending measures to minimize the damage in future quakes.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

ThinkGeo Cloud Maps Sample for WebForms

This sample demonstrates how you can display ThinkGeo Cloud Maps in your Map Suite GIS applications. It will show you how to use the XYZFileBitmapTileCache to improve the performance of map rendering. ThinkGeoCloudMapsOverlay uses the ThinkGeo Cloud XYZ Tile Server as raster map tile server. It supports 5 different map styles: - Light - Dark - Aerial - Hybrid - TransparentBackground

ThinkGeo Cloud Maps support would work in all of the Map Suite controls such as Wpf, Web, MVC, WebApi, Android and iOS.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Edit Overlay Styles Sample for WebForms

This Web project demonstrates how to control the styles of the EditOverlay, for both the default style and the editing style. In order to accomplish this, we use javascript code. Look at the code in the *script* tag to see how we can control the fill color, the opacity, the border width, and other attributes of the features in the EditOverlay.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

How Do I Sample for WebForms

The “How Do I?” samples collection is a comprehensive set containing dozens of interactive samples.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

Site Selection Sample for WebForms

The Site Selection sample template allows you to view, understand, interpret, and visualize spatial data in many ways that reveal relationships, patterns, and trends. In the example illustrated, the user can apply the features of GIS to analyze spatial data to efficiently choose a suitable site for a new retail outlet.

Please refer to Wiki for the details.

Screenshot

View this sample on Gitlab

map_suite_all_samples.txt · Last modified: 2017/03/02 08:28 by marklee