User Tools

Site Tools


map_suite_desktop_edition_miscellaneous_samples

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
map_suite_desktop_edition_miscellaneous_samples [2015/08/20 03:08]
127.0.0.1 external edit
map_suite_desktop_edition_miscellaneous_samples [2017/03/17 03:03] (current)
tgwikiupdate
Line 1: Line 1:
-====== ​Map_Suite_Desktop_Edition_Miscellaneous_Samples ​======+====== ​ Map Suite Desktop Edition Miscellaneous Samples  ​====== 
 +<div sampleitem>​ 
 +====  Custom Scale Bar  ==== 
 +<div screenshot>​ 
 +{{desktopedition:​codesamples:​Map Suite Desktop Edition Sample Custom Scale Bar.jpg?​300x180}} 
 +</​div>​ 
 +<div content>​ 
 +<div download_viewsource_buttons>​ 
 +[[Source_Code_WebEditionSample_CustomScaleBar_CS_100810.zip|View Source]] 
 +{{filehistory:​WebEditionSample_CustomScaleBar_CS_100810.zip|C#​ Download}} 
 +</​div>​ 
 +<div sample_otherlinks>​ 
 +[[Map Suite Samples Applies To|Applies To: Desktop \ Web \ Silverlight \ Services \ Wpf ]] 
 +\\ 
 +[[Map Suite Samples Alternate Languages | Need it in another language?​]] 
 +</​div>​ 
 +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. 
 +</​div>​ 
 +</​div>​
  
-<​noinclude>​ +---- 
-{{article rating}} +<div sampleitem
-</noinclude+====  ​Draw ​Custom ​Exception  ​==== 
-====Custom ​Scale Bar==== +<div screenshot>​ 
-^ Screenshot ^ width=78|Sample ^ width=66|Product ^ Description ^ +{{desktopedition:​codesamples:Map Suite Desktop Edition Sample ​Draw Custom ​Exception.png?300x180}} 
-{{wiki:Map Suite Desktop Edition Sample Custom ​Scale Bar.jpg?250}}   | [[Source_Code_WebEditionSample_CustomScaleBar_CS_100810.zip|View Source]]\\ \\ [[:File:WebEditionSample_CustomScaleBar_CS_100810.zip|C# Download]]\\ \\ //[[Map Suite Samples Alternate Languages|Need it in another language?​]]// ​  | [[Map Suite Web Edition|Web \\ \\ ]]//[[Map Suite Samples Applies To|Applies To: Desktop \\  ​Web \\  ​Silverlight \\  ​Services \\  ​Wpf \\ ]]//   | In today’s Web project, we learn how to extend ScaleBarAdornmentLayer to create a custom scale bar that is based on 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 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  |+</​div>​ 
 +<div content>​ 
 +<div download_viewsource_buttons>​ 
 +[[Source_Code_DesktopEditionSample_DrawCustomException_CS_100127.zip|View Source]] 
 +{{filehistory:DesktopEditionSample_DrawCustomException_CS_100127.zip|C# Download}} 
 +</div> 
 +<div sample_otherlinks>​ 
 +[[Map Suite Samples Applies To|Applies To: Desktop \ Web \ Silverlight \ Services \ Wpf ]] 
 +\\ 
 +[[Map Suite Samples Alternate Languages | Need it in another language?]] 
 +</div> 
 +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 processWe have 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. 
 +</​div>​ 
 +</​div>​
  
 +----
 +<div sampleitem>​
 +====  Managing Cache  ====
 +<div screenshot>​
 +{{:​No_screenshot.jpg?​300x180}}
 +</​div>​
 +<div content>
 +<div download_viewsource_buttons>​
 +[[Source_Code_DesktopEditionSample_ManagingCache_CS_100508.zip|View Source]]
 +{{filehistory:​DesktopEditionSample_ManagingCache_CS_100508.zip|C#​ Download}}
 +</​div>​
 +<div sample_otherlinks>​
 +[[Map Suite Samples Applies To|Applies To: Desktop ]]
 +\\
 +[[Map Suite Samples Alternate Languages | Need it in another language?]]
 +</​div>​
 +This project is an introduction on how to handle some basic principles of caching the map in the Desktop edition. Cache has the advantage of reusing existing images of the map when revising areas of the map that have already have been drawn. When in Snap Up mode for Zoom level snapping, cache is very handy. But it is a recommendable practice to not use it when the Zoom Level snapping mode is set to none because it can have the unintended consequence of generating an almost unlimited number of tiles. This project will be followed by other ones showing more advanced features of caching.
 +</​div>​
 +</​div>​
  
-====Draw Custom Exception==== +---- 
-^ Screenshot ^ width=78|Sample ^ width=66|Product ^ Description ^ +<div sampleitem>​ 
-{{wiki:Map Suite Desktop Edition Sample Draw Custom Exception.png?250}}   | [[Source_Code_DesktopEditionSample_DrawCustomException_CS_100127.zip|View Source]]\\ \\ [[:File:​DesktopEditionSample_DrawCustomException_CS_100127.zip|C# Download]]\\ ​\\ //[[Map Suite Samples Alternate Languages|Need it in another language?​]]/​/   | [[Map Suite Desktop ​Edition|Desktop \\ \\ ]]//[[Map Suite Samples Applies To|Applies To: Desktop \\  Web \\  Silverlight \\  Services \\  Wpf \\ ]]//   | This sample shows how you can suppress and draw exceptions in desktop overlays instead of throwing themThere 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 processWe have a default image we draw in this case; however, you can override this using the DrawExceptionCore method ​and draw whatever ​you wantBy default we always throw expections, but to start drawing them you can use the Overlay.DrawExceptionMode property  |+====  Map Suite Explorer  ​==== 
 +<div screenshot>​ 
 +{{desktopedition:codesamples:​Map_Suite_Desktop_Edition_Sample_Map_Suite_Explorer.jpg?300x180}} 
 +</​div>​ 
 +<div content>​ 
 +<div download_viewsource_buttons>​ 
 +[[Source_Code_DesktopEditionSample MapSuiteExplorer CS 100923.zip|View Source]] 
 +{{filehistory:DesktopEditionSample MapSuiteExplorer CS 100923.zip|C# Download}} 
 +</​div>​ 
 +<div sample_otherlinks>​ 
 +[[Map Suite Samples Applies To|Applies To: Desktop ​]] 
 +\\ 
 +[[Map Suite Samples Alternate Languages | Need it in another language?]] 
 +</div> 
 +This week, we decided to publish in the Code Community the project for Map Suite Explorer. You are already familiar with that free Desktop ​tool that comes with any edition of Map Suite. ​It is a basic GIS tool that allows you to view your geographic data and its tabular information. It also allows doing some basic manipulation on your date such as building ​the spatial indexWith the source code at your disposition, you can cut time developing your own application by having at your disposal ​the code for doing common tasks such as loading, unloading layers, building spatial index, changing styles etc. You will also find interesting the legend ​and see how you can add, remove, move up and down the different layersIt is by far the most comprehensive project in the Code Community ​to that date. You will need the reference for MapSuiteDesktop.dll and MapSuiteCore.dll (full or evaluation) to run it. 
 +</​div>​ 
 +</​div>​
  
 +----
 +<div sampleitem>​
 +====  MDI Form  ====
 +<div screenshot>​
 +{{desktopedition:​codesamples:​Map Suite Desktop Edition Sample MDI Form.jpg?​300x180}}
 +</​div>​
 +<div content>
 +<div download_viewsource_buttons>​
 +[[Source_Code_DesktopEditionSample_MDIform_CS_100405.zip|View Source]]
 +{{filehistory:​DesktopEditionSample_MDIform_CS_100405.zip|C#​ Download}}
 +</​div>​
 +<div sample_otherlinks>​
 +[[Map Suite Samples Applies To|Applies To: Desktop \ Web \ Silverlight \ Services \ Wpf ]]
 +\\
 +[[Map Suite Samples Alternate Languages | Need it in another language?]]
 +</​div>​
 +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.
 +</​div>​
 +</​div>​
  
-====Managing Cache==== +---- 
-^ Screenshot ^ width=78|Sample ^ width=66|Product ^ Description ^ +<div sampleitem>​ 
-{{wiki:No screenshot.jpg}} ​  | [[Source_Code_DesktopEditionSample_ManagingCache_CS_100508.zip|View Source]]\\ \\ [[:File:DesktopEditionSample_ManagingCache_CS_100508.zip|C# Download]]\\ \\ //[[Map Suite Samples ​Alternate Languages|Need it in another language?​]]// ​  | [[Map Suite Desktop Edition|Desktop \\ \\ ]]//[[Map Suite Samples ​Applies To|Applies To: Desktop \\ ]]//   ​| ​This project is an introduction on how to handle some basic principles of caching the map in the Desktop editionCache has the advantage of reusing existing images of the map when revising areas of the map that have already have been drawnWhen in Snap Up mode for Zoom level snapping, cache is very handy. But it is a recommendable practice ​to not use it when the Zoom Level snapping mode is set to none because it can have the unintended consequence of generating an almost unlimited number of tiles. This project will be followed by other ones showing ​more advanced features ​of caching  ​|+====  ​Topology Validation  ​==== 
 +<div screenshot>​ 
 +{{desktopedition:codesamples:​Map Suite Desktop Edition Sample Topology Validation.jpg?300x180}} 
 +</​div>​ 
 +<div content>​ 
 +<div download_viewsource_buttons>​ 
 +[[Source_Code_DesktopEditionSample_TopologyValidation_CS_120904.zip|View Source]] 
 +{{filehistory:DesktopEditionSample TopologyValidation CS 120904.zip|C# Download}} 
 +</div> 
 +<div sample_otherlinks>​ 
 +[[Map Suite Samples ​Applies To|Applies To: Desktop \ Web Silverlight ​Services ​Wpf ]] 
 +\\ 
 +[[Map Suite Samples ​Alternate Languages ​Need it in another language?]] 
 +</div> 
 +Starting with version 6.0.113.0, Map Suite includes topology validation capabilities.  ​This Topology Validator sample application makes it simple ​to visualize and test topology rulesYou simply select ​the case you want to test, use our drawing tools to create ​the shapes necessary, and then hit the play button to run the testThe error cases are highlighted on the screen and saved to the test, and their Well-Known Text (WKT) is copied ​to your clipboard. At any time, you can view or edit the WKT which makes up the case. We save our test cases as XML files that contain not only the test case features but also the errors. This makes it a snap for you to share your cases with us or other colleagues. ​ \\  \\ For more details including a list of topology cases that you can test, see [[http://​gis.thinkgeo.com/​Support/​DiscussionForums/​tabid/​143/​aff/​16/​aft/​10443/​afv/​topic/​Default.aspx#​topology|this article]] or watch the [[http://​youtu.be/​IuLGTRsVtQc|video overview]] 
 +</​div>​ 
 +</​div>​
  
 +----
 +<div sampleitem>​
 +====  Snap To Grid Dots  ====
 +<div screenshot>​
 +{{desktopedition:​codesamples:​Map Suite Desktop Edition Sample Snap To Grid Dots.png?​300x180}}
 +</​div>​
 +<div content>
 +<div download_viewsource_buttons>​
 +[[Source_Code_DesktopEditionSample_SnapToGridDots_CS_151228.zip|View Source]]
 +{{filehistory:​DesktopEditionSample_SnapToGridDots_CS_151228.zip|C#​ Download}}
 +</​div>​
 +<div sample_otherlinks>​
 +[[Map Suite Samples Applies To|Applies To: Desktop \ Web \ Silverlight \ Services \ Wpf ]]
 +\\
 +[[Map Suite Samples Alternate Languages | Need it in another language?]]
 +</​div>​
 +This sample shows you how to improve drawing accuracy. When drawing a shape on the map it allows you to snap to the closest grid item based on a specified tolerance. ​
 +</​div>​
 +</​div>​
  
-====Map ​Suite Explorer==== +---- 
-^ Screenshot ^ width=78|Sample ^ width=66|Product ^ Description ^ +<div sampleitem>​ 
-{{wiki:Map Suite Desktop Edition Sample Map Suite Explorer.jpg}}   | [[Source_Code_DesktopEditionSample MapSuiteExplorer CS 100923.zip|View Source]]\\ \\ [[:File:DesktopEditionSample MapSuiteExplorer CS 100923.zip|C# Download]]\\ \\ //[[Map Suite Samples ​Alternate Languages|Need it in another language?​]]// ​  | [[Map Suite Desktop Edition|Desktop \\ \\ ]]//[[Map Suite Samples ​Applies To|Applies To: Desktop \\ ]]//   ​| ​This week, we decided ​to publish in the Code Community the project for Map Suite ExplorerYou are already familiar with that free Desktop tool that comes with any edition of Map Suite. ​It is a basic GIS tool that allows you to view your geographic data and its tabular information. It also allows doing some basic manipulation on your date such as building ​the spatial index. With the source code at your dispositionyou can cut time developing your own application by having at your disposal ​the code for doing common tasks such as loading, unloading layers, building spatial index, changing styles etc. You will also find interesting ​the legend and see how you can addremove, move up and down the different layers. It is by far the most comprehensive project ​in the Code Community to that dateYou will need the reference for MapSuiteDesktop.dll and MapSuiteCore.dll (full or evaluation) ​to run it  |+====  ​Use ​Map with MVC Framework  ​==== 
 +<div screenshot>​ 
 +{{desktopedition:​codesamples:Map Suite Desktop Edition Sample ​Use Map with MVC Framework.png?300x180}} 
 +</​div>​ 
 +<div content>​ 
 +<div download_viewsource_buttons>​ 
 +[[Source_Code_WebEditionSample_UseMapWithMVCFramework_CS.zip|View Source]] 
 +{{filehistory:WebEditionSample_UseMapWithMVCFramework_CS_141211.zip|C# Download}} 
 +</div> 
 +<div sample_otherlinks>​ 
 +[[Map Suite Samples ​Applies To|Applies To: Desktop \ Web Silverlight ​Services ​Wpf ]] 
 +\\ 
 +[[Map Suite Samples ​Alternate Languages ​Need it in another language?]] 
 +</div> 
 +This project demonstrates how to create a web-based map using Microsoft ASP.NET MVC 1.0 and Map Suite Web EditionTo meet the requirements of MVCwe inherit ​the interface IMapInitializer in the controllerwhich has a function InitializeMap that is overridden ​in the controllerWe then implement ​the class "​MapInitializerHelper" ​to initialize the map instance. 
 +</​div>​ 
 +</​div>​
  
 +----
  
-====MDI Form==== +<div sampleitem>​ 
-^ Screenshot ^ width=78|Sample ^ width=66|Product ^ Description ^ +====  Track Zoom In With Shift  ​==== 
-{{wiki:Map Suite Desktop Edition Sample ​MDI Form.jpg?250}}   | [[Source_Code_DesktopEditionSample_MDIform_CS_100405.zip|View Source]]\\ \\ [[:File:DesktopEditionSample_MDIform_CS_100405.zip|C# Download]]\\ \\ //[[Map Suite Samples Alternate Languages|Need it in another language?​]]// ​  | [[Map Suite Desktop Edition|Desktop \\ \\ ]]//[[Map Suite Samples Applies To|Applies To: Desktop \\  ​Web \\  ​Silverlight \\  ​Services \\  ​Wpf \\ ]]//   | 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.   | +<div screenshot>​ 
- +{{desktopedition:​codesamples:Map Suite Desktop Edition Sample ​Track Zoom In With Shift.jpg?300x180}} 
- +</​div>​ 
-====Topology Validation==== +<div content>​ 
-^ Screenshot ^ width=78|Sample ^ width=66|Product ^ Description ^ +<div download_viewsource_buttons>​ 
-| {{wiki:Map Suite Desktop Edition Sample Topology Validation.jpg?​250}} ​  | [[Source_Code_DesktopEditionSample_TopologyValidation_CS_120904.zip|View Source]]\\ \\ [[:​File:​DesktopEditionSample TopologyValidation CS 120904.zip|C#​ Download]]\\ \\ //[[Map Suite Samples Alternate Languages|Need it in another language?​]]/​/   | [[Map Suite Desktop Edition|Desktop \\ \\ ]]//[[Map Suite Samples Applies To|Applies To: Desktop \\  Web \\  Silverlight \\  Services \\  Wpf \\ ]]//   | Starting with version 6.0.113.0, Map Suite includes topology validation capabilities.  ​This Topology Validator ​sample ​application makes it simple to visualize and test topology rules. You simply select the case you want to test, use our drawing tools to create the shapes necessary, and then hit the play button to run the test. The error cases are highlighted on the screen and saved to the test, and their Well-Known Text (WKT) is copied to your clipboard. At any time, you can view or edit the WKT which makes up the caseWe save our test cases as XML files that contain not only the test case features but also the errors. This makes it a snap for you to share your cases with us or other colleagues. ​ \\  \\ For more details including a list of topology cases that you can test, see [[http://​gis.thinkgeo.com/​Support/​DiscussionForums/​tabid/​143/​aff/​16/​aft/​10443/​afv/​topic/​Default.aspx#​topology|this article]] or watch the {{Videolink|[[http://​youtu.be/IuLGTRsVtQc|video overview]]}} ​  | +[[Source_Code_DesktopEditionSample_TrackZoomInWithShift_CS_150828.zip|View Source]] 
- +{{filehistory:DesktopEditionSample_TrackZoomInWithShift_CS_150828.zip|C# Download}} 
- +</div> 
-====Use Map with MVC Framework==== +<div sample_otherlinks>​ 
-^ Screenshot ^ width=78|Sample ^ width=66|Product ^ Description ^ +[[Map Suite Samples Applies To|Applies To: Desktop \ Web \ Silverlight \ Services \ Wpf ]] 
-| {{wiki:Map Suite Desktop Edition Sample Use Map with MVC Framework.png?​250}} ​  | [[Source_Code_WebEditionSample_UseMapWithMVCFramework_CS.zip|View Source]]\\ \\ [[:​File:​WebEditionSample_UseMapWithMVCFramework_CS_141211.zip|C#​ Download]]\\ \\ //[[Map Suite Samples Alternate Languages|Need it in another language?​]]// ​  | [[Map Suite Web Edition|Web \\ \\ ]]//[[Map Suite Samples Applies To|Applies To: Desktop \\  Web \\  Silverlight \\  Services \\  Wpf \\ ]]//   | 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 MVCwe 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  | +\\ 
- +[[Map Suite Samples Alternate Languages | Need it in another language?]] 
-{{:Map Suite Services Edition Miscellaneous Samples}}+</div> 
 +This sample ​shows how you can track zoom in. this sample restrict ​the track zoom shape when press “Shift Key”The restricted shape is same resolution (width/height) ​with map. When set the map’s snapping mode to none, the map zooms to specific zoom level without snapping Select ​the display area with mouse and shift.  
 +</​div>​ 
 +</​div>​
  
 +----
 +{{page>​map_suite_services_edition_miscellaneous_samples}}
map_suite_desktop_edition_miscellaneous_samples.1440040123.txt.gz · Last modified: 2015/09/08 06:46 (external edit)