This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
map_suite_desktop_for_wpf_quick_start_guide [2017/03/15 05:59] tgwikiupdate |
map_suite_desktop_for_wpf_quick_start_guide [2017/03/23 07:11] (current) tgwikiupdate |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Map Suite Quick Start Guide For Wpf ====== | ====== Map Suite Quick Start Guide For Wpf ====== | ||
- | <div msgbox> | + | {{section>upgrade_map_suite_from_9.0#Upgrade Map Suite to 10.0}} |
- | 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 Desktop for Wpf 10.0.0 and higher and will show you how to create a WPF application using Map Suite WPF components. | + | |
- | + | ||
- | If you want to build a Winforms application, please see the [[map_suite_desktop_for_winforms_quick_start_guide|WinForms Quickstart Guide]] instead.</div> | + | |
Welcome to Map Suite™ from ThinkGeo, a full featured mapping control that makes it easy for any Microsoft .NET developer to add mapping functionality to a Microsoft .NET application quickly and efficiently. Using the intuitive object model, even developers inexperienced in Geographic Information Systems (GIS) can have fully functional maps working in minutes. | Welcome to Map Suite™ from ThinkGeo, a full featured mapping control that makes it easy for any Microsoft .NET developer to add mapping functionality to a Microsoft .NET application quickly and efficiently. Using the intuitive object model, even developers inexperienced in Geographic Information Systems (GIS) can have fully functional maps working in minutes. | ||
Line 50: | Line 47: | ||
//Figure 5. NuGet installation success.// | //Figure 5. NuGet installation success.// | ||
- | ===== Adding the Map Control to your Form ===== | + | ===== Adding the Map Control ===== |
Open ".../QuickstartSample/packages/MapSuiteDesktopForWpf-Standard.10.0.0/designtime" package folder and drag "ThinkGeo.MapSuite.Wpf.dll" assembly to the Toolbox of Visual Studio. | Open ".../QuickstartSample/packages/MapSuiteDesktopForWpf-Standard.10.0.0/designtime" package folder and drag "ThinkGeo.MapSuite.Wpf.dll" assembly to the Toolbox of Visual Studio. | ||
Line 57: | Line 54: | ||
Draw the Map control on the MainWindow by clicking on the WpfMap Control object in the Toolbox and | Draw the Map control on the MainWindow by clicking on the WpfMap Control object in the Toolbox and | ||
- | then dragging and dropping (using the left mouse button) to the MainWindow. You can resize the map if you desire. You can leave the name of the | + | then dragging(using the left mouse button) it to the MainWindow. You can resize the map if you desire. You can leave the name of the |
Map control as Map1. Our map will display in this object. | Map control as Map1. Our map will display in this object. | ||
- | {{mapsuite10:desktop:Map_Suite_WinForms_QSG_AddMapControl.png}} | + | {{mapsuite10:Wpf:Map_Suite_Wpf_QSG_AddMapControl.png}} |
Line 81: | Line 78: | ||
</code> | </code> | ||
- | {{mapsuite10:desktop:Map_Suite_Wpf_QSG_MapXmlCode.png}} | + | {{mapsuite10:Wpf:Map_Suite_Wpf_QSG_MapXmlCode.png}} |
\\ | \\ | ||
//Figure 6. Add Map Control to your application.// | //Figure 6. Add Map Control to your application.// | ||
- | Now it is time to press F5 to start the application. If you have not set up a developer license, the Map Suite Product Center will pop up. You need to generate your developer license. For more details, please refer to http://wiki.thinkgeo.com/wiki/map_suite_developer_license_guide. | + | If you have not set up a developer license, the Map Suite Product Center will pop up when you debug the app. You need to generate your developer license. For more details, please refer to http://wiki.thinkgeo.com/wiki/map_suite_developer_license_guide. |
\\ | \\ | ||
Once the developer license is ready, run the application. Your map should look like the one below: (see Figure 7). | Once the developer license is ready, run the application. Your map should look like the one below: (see Figure 7). | ||
Line 92: | Line 89: | ||
//Figure 7. The normal map is rendered after the developer license file has been got.// | //Figure 7. The normal map is rendered after the developer license file has been got.// | ||
- | ==== Map Suite WPF Desktop "QuickstartSample" ==== | + | ==== Map Suite Desktop for Wpf "QuickstartSample" ==== |
- | In creating our “QuickstartSample" application, our first step is to set references to the ThinkGeo.MapSuite.Layers, ThinkGeo.MapSuite.Styles and ThinkGeo.MapSuite.Wpf workspaces at the very top of our code, as we will use many classes within them. We do this so that we do not have to use the fully qualified name of the Map Suite classes throughout our code. Setting a reference to the Map Suite workspace can be done in the “code-behind” of the Form by selecting the Form and hitting the F7 function key. Set the reference like this: | + | In creating our “QuickstartSample" application, our first step is to set references to the ThinkGeo.MapSuite.Layers, ThinkGeo.MapSuite.Styles and ThinkGeo.MapSuite.Wpf workspaces at the very top of our code, as we will use many classes within them. We do this so that we do not have to use the fully qualified name of the Map Suite classes throughout our code. Setting a reference to the Map Suite workspace can be done in the “code-behind” of the form by selecting the form and hitting the F7 function key. Set the reference like this: |
<code csharp> | <code csharp> | ||
Line 354: | Line 351: | ||
This completes this scenario. The next thing you might want to do is to make it run on another machine that does not have a developer license. A runtime license is the one we are looking for. Here is a guide to generate a runtime license to satisfy it, please refer to (http://wiki.thinkgeo.com/wiki/map_suite_runtime_license_guide_for_desktop ) for details. | This completes this scenario. The next thing you might want to do is to make it run on another machine that does not have a developer license. A runtime license is the one we are looking for. Here is a guide to generate a runtime license to satisfy it, please refer to (http://wiki.thinkgeo.com/wiki/map_suite_runtime_license_guide_for_desktop ) for details. | ||
- | ===== Notes ===== | ||
- | Because the Map Suite Wpf uses multi-threading internally for drawing, if you want to change an overlay after the map is initialized, you need to lock the overlay first to avoid threading conflicts. For more information, please have a look at our “How Do I?” sample applications that come with the product. | ||
===== Summary ===== | ===== Summary ===== |