User Tools

Site Tools


map_suite_desktop_for_winforms_all_samples

Table of Contents

WinForms Samples

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

map_suite_desktop_for_winforms_all_samples.txt · Last modified: 2023/08/22 12:52 by ruili