User Tools

Site Tools


map_suite_desktop_for_winforms_quick_start_guide

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
map_suite_desktop_for_winforms_quick_start_guide [2017/03/15 02:36]
tgwikiupdate
map_suite_desktop_for_winforms_quick_start_guide [2017/03/15 05:16]
tgwikiupdate
Line 23: Line 23:
 Let's start by creating a new Windows Forms Application in Microsoft Visual Studio (2015 or newer) named QuickstartSample(see Figure 1). We can create the project with .NET Framework 4.5 or higher. Let's start by creating a new Windows Forms Application in Microsoft Visual Studio (2015 or newer) named QuickstartSample(see Figure 1). We can create the project with .NET Framework 4.5 or higher.
  
-{{mapsuite10:​WinForms:​Map_Suite_WinForms_QSG_NewProject.png}}+{{mapsuite10:​desktop:​Map_Suite_WinForms_QSG_NewProject.png}}
 \\ \\
 //Figure 1. Creating a new project in Microsoft Visual Studio.// //Figure 1. Creating a new project in Microsoft Visual Studio.//
Line 32: Line 32:
 After you created a QuickstartSample project, we will see a project in the solution, please see Figure 2. After you created a QuickstartSample project, we will see a project in the solution, please see Figure 2.
  
-{{mapsuite10:​WinForms:​Map_Suite_WinForms_QSG_QuickstartProject.png}}+{{mapsuite10:​desktop:​Map_Suite_WinForms_QSG_QuickstartProject.png}}
 \\ \\
  
Line 44: Line 44:
 Right-click the Reference in Solution Explorer and select “Manage NuGet Packages” (See Figure 3).  Right-click the Reference in Solution Explorer and select “Manage NuGet Packages” (See Figure 3). 
  
-{{mapsuite10:​WinForms:​Map_Suite_WinForms_QSG_NuGetManager.png}}+{{mapsuite10:​desktop:​Map_Suite_WinForms_QSG_NuGetManager.png}}
  
 //Figure 3. Refer to Manage NuGet Packages.// //Figure 3. Refer to Manage NuGet Packages.//
Line 54: Line 54:
 In that package list, please select “MapSuiteDesktopForWinForms-Standard” package and click the “Install” button in the right panel. In that package list, please select “MapSuiteDesktopForWinForms-Standard” package and click the “Install” button in the right panel.
  
-{{mapsuite10:​WinForms:​Map_Suite_WinForms_QSG_InstallWinFormsPackage.png}}+{{mapsuite10:​desktop:​Map_Suite_WinForms_QSG_InstallWinFormsPackage.png}}
 //Figure 4. Refer to MapSuiteDesktopForWinForms-Standard.//​ //Figure 4. Refer to MapSuiteDesktopForWinForms-Standard.//​
 \\ \\
 \\ \\
-The "​NetTopologySuite"​ is the third part assembly, so the license acceptance is required. You can click "I Accept"​ to agree the license.+Click “OK” if the message box like Figure 5 pops up.
 \\ \\
-{{mapsuite10:​WinForms:Map_Suite_WinForms_QSG_PackageLicenseAcceptance.png}}+{{mapsuite10:​desktop:Map_Suite_WinForms_QSG_ReferenceRreview.png}}
 \\ \\
 +//Figure 5. Review package references.//​
 \\ \\
-Click “OK” if the message box like Figure 5 pops up. 
 \\ \\
  
-{{mapsuite10:​WinForms:​Map_Suite_WinForms_QSG_ReferenceRreview.png}}+The "​NetTopologySuite"​ is the third part assembly, so the license acceptance is requiredYou can click "I Accept"​ to agree the license.(See Figure 6)
 \\ \\
-//​Figure ​5. NuGet installation success.//+{{mapsuite10:​desktop:​Map_Suite_WinForms_QSG_PackageLicenseAcceptance.png}} 
 +\\ 
 +//​Figure ​6. NuGet installation success.//
 \\ \\
 \\ \\
Line 74: Line 76:
 Once the package is installed, you can see the message “Successfully installed ​ Once the package is installed, you can see the message “Successfully installed ​
 '​MapSuiteDesktopForWinForms-Standard'​ to QuickstartSample” in your Microsoft Visual Studio Output box.  '​MapSuiteDesktopForWinForms-Standard'​ to QuickstartSample” in your Microsoft Visual Studio Output box. 
-Some Desktop assemblies have been added into the project references. (See Figure ​6).+Some Desktop assemblies have been added into the project references. (See Figure ​7).
  
-{{mapsuite10:​WinForms:​Map_Suite_WinForms_QSG_ProjectReferences.png}}+{{mapsuite10:​desktop:​Map_Suite_WinForms_QSG_ProjectReferences.png}}
 \\ \\
-//​Figure ​6. NuGet installation result.//+//​Figure ​7. NuGet installation result.//
 \\ \\
 \\ \\
- 
  
 ===== Adding the Map Control to Your Form ===== ===== Adding the Map Control to Your Form =====
 +Open "​.../​QuickstartSample/​packages/​MapSuiteDesktopForWinForms-Standard.10.0.0/​designtime"​ package folder and drag "​ThinkGeo.MapSuite.WinForms.dll"​ assembly to the Toolbox of Visual Studio.
 +
 +{{mapsuite10:​desktop:​Map_Suite_WinForms_QSG_ControlDesigntime.png}}
 +
 +
 Draw the Map control on the form by clicking on the WinformsMap Control object in the Toolbox and  Draw the Map control on the form by clicking on the WinformsMap Control object in the Toolbox and 
 then dragging and dropping (using the left mouse button) to the form. You can resize the map if you desire. You can leave the name of the  then dragging and dropping (using the left mouse button) to the form. You can resize the map if you desire. You can leave the name of the 
 Map control as winformsMap1. Our map will display in this object. Map control as winformsMap1. Our map will display in this object.
  
-{{mapsuite10:​WinForms:​Map_Suite_WinForms_QSG_AddMapControl.png}}+{{mapsuite10:​desktop:​Map_Suite_WinForms_QSG_AddMapControl.png}}
  
-===== Map Suite Desktop "Hello World" ===== +===== Map Suite Desktop "QuickstartSample" ===== 
-In creating your “Hello World” sample ​application,​ your first step is to set some references at the very top of your code +In creating your “QuickstartSample" ​application,​ your first step is to set some references at the very top of your code 
 as you will use many classes within that. Open the “Form1.cs” in the project and click the form in the opened design box  as you will use many classes within that. Open the “Form1.cs” in the project and click the form in the opened design box 
 to move to the “View Code” of the form. Add the references like this: to move to the “View Code” of the form. Add the references like this:
Line 151: Line 157:
 Once the developer license is ready, run the application. Your map should look like the one below: (see Figure 12). Once the developer license is ready, run the application. Your map should look like the one below: (see Figure 12).
  
-{{mapsuite10:​WinForms:​Map_Suite_WinForms_QSG_ShowAreaStyle.png}}+{{mapsuite10:​desktop:​Map_Suite_WinForms_QSG_ShowAreaStyle.png}}
 \\ \\
 //Figure 12. A sample map of Europe.// //Figure 12. A sample map of Europe.//
Line 208: Line 214:
 And the result is as follows (Figure 13): And the result is as follows (Figure 13):
  
-{{mapsuite10:​WinForms:​Map_Suite_WinForms_QSG_ShowPointStyle.png}}+{{mapsuite10:​desktop:​Map_Suite_WinForms_QSG_ShowPointStyle.png}}
 \\ \\
 //Figure 13. Map of Europe with 2 layers.// //Figure 13. Map of Europe with 2 layers.//
Line 218: Line 224:
 A TextStyle is used to label items on map. As every ShapeFile has a relative .dbf file that includes descriptions for every record, the most common way to use TextStyles is for labeling. For example, WorldCapital Shapefile'​s corresponding .dbf file contains the field "​CITY_NAME"​. We can use this field to label the cities on our map. A TextStyle is used to label items on map. As every ShapeFile has a relative .dbf file that includes descriptions for every record, the most common way to use TextStyles is for labeling. For example, WorldCapital Shapefile'​s corresponding .dbf file contains the field "​CITY_NAME"​. We can use this field to label the cities on our map.
  
-{{mapsuite10:​WinForms:​Map_Suite_WinForms_QSG_DBFDetails.png}}+{{mapsuite10:​desktop:​Map_Suite_WinForms_QSG_DBFDetails.png}}
  
 Map Suite has many TextStyles built in to help us quickly design attractive labels for the cities on our map. We can just pick the TextStyle we like and use it. Map Suite has many TextStyles built in to help us quickly design attractive labels for the cities on our map. We can just pick the TextStyle we like and use it.
Line 281: Line 287:
 The result is as follows (Figure 14): The result is as follows (Figure 14):
  
-{{mapsuite10:​WinForms:​Map_Suite_WinForms_QSG_ShowTextStyle.png}}+{{mapsuite10:​desktop:​Map_Suite_WinForms_QSG_ShowTextStyle.png}}
 \\ \\
 //Figure 14. Map of Europe with a TextStyle.//​ //Figure 14. Map of Europe with a TextStyle.//​
Line 354: Line 360:
 Can you imagine what the map will look like now? Below is the result. At first it appears like figure 15, and the map changes to figure 8 as you zoom in. Can you imagine what the map will look like now? Below is the result. At first it appears like figure 15, and the map changes to figure 8 as you zoom in.
  
-{{mapsuite10:​WinForms:​Map_Suite_WinForms_QSG_ShowLowZoomLevel.png}}+{{mapsuite10:​desktop:​Map_Suite_WinForms_QSG_ShowLowZoomLevel.png}}
 \\ \\
 //Figure 15. A map of Europe with two ZoomLevels, before zooming in.// //Figure 15. A map of Europe with two ZoomLevels, before zooming in.//
  
-{{mapsuite10:​WinForms:​Map_Suite_WinForms_QSG_ShowHeightZoomLevel.png}}+{{mapsuite10:​desktop:​Map_Suite_WinForms_QSG_ShowHeightZoomLevel.png}}
 \\ \\
 //Figure 16. The same map with two ZoomLevels, after zooming in.// //Figure 16. The same map with two ZoomLevels, after zooming in.//
map_suite_desktop_for_winforms_quick_start_guide.txt · Last modified: 2017/03/15 05:16 by tgwikiupdate