User Tools

Site Tools


map_suite_wpf_desktop_edition_miscellaneous_samples

This is an old revision of the document!


Map Suite Wpf Desktop Edition Miscellaneous Samples

Custom Scale Bar

map_suite_wpf_desktop_edition_sample_custom_scale_bar.jpg

In today’s Web project, we learn how to extend ScaleBarAdornmentLayer to create a custom scale bar that is based on a projection of choice instead of the projection of the map. This can be useful when the displayed projection of the map has highly distortable distances especially at high latitudes such as Spherical Mercator (used by Google Map, Virtual Earth, Yahoo maps etc). Using a scale bar based on distance geometry of the Geodetic (WGS84) projection will give a more accurate result. Note that the CustomScaleBar class is based on MapSuiteCore and can be used in any other versions of MapSuite such as Desktop.


Draw Custom Exception

This sample shows how you can suppress and draw exceptions in desktop overlays instead of throwing them. There is a little-known feature in the Map Suite Desktop Edition Overlay class that allows you to draw an exception in the event an exception is thrown during the drawing process. We have a default image we draw in this case; however, you can override this using the DrawExceptionCore method and draw whatever you want. By default we always throw expections, but to start drawing them you can use the Overlay.DrawExceptionMode property.


MDI Form

map_suite_wpf_desktop_edition_sample_mdi_form.jpg

In today’s project, we show how to have the WinformsMap control in a MDI form. Using an MDI form with a map background can represent a challenge. You will see in this project the technique to display properly a child form on top of the map. You can also notice how the map is accessed from the child form by plotting points on it from the child form.



Use Map with MVC Framework

This project demonstrates how to create a web-based map using Microsoft ASP.NET MVC 1.0 and Map Suite Web Edition. To meet the requirements of MVC, we inherit the interface IMapInitializer in the controller, which has a function InitializeMap that is overridden in the controller. We then implement the class “MapInitializerHelper” to initialize the map instance.


ShapeFile to SQLite Convertion Tool

convert_shapefile_to_sqlite.jpg



This sample demonstrates how to save the features in a shape file (.shp) into a Sqlite file (.sqlite) for a higher query performance. This takes the built-in functionalities of recent daily builds after 9.0.0.1/9.0.1.0 or later, which you can download from the ThinkGeo Customer Portal or Map Suite Product Center.


map_suite_wpf_desktop_edition_miscellaneous_samples.1442496742.txt.gz · Last modified: 2015/09/17 13:32 by admin