This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
map_suite_xamarin_forms_quick_start_guide [2015/09/09 10:33] admin [How to Use TextStyle] |
map_suite_xamarin_forms_quick_start_guide [2017/03/17 02:21] (current) tgwikiupdate |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Map Suite Xamarin Forms Quick Start Guide ====== | ====== Map Suite Xamarin Forms Quick Start Guide ====== | ||
+ | |||
+ | {{section>upgrade_map_suite_to_10.0}} | ||
<div msgbox>The Map Suite Xamarin.Forms illustrated QuickStart Guide will guide you through the process of creating a sample application and will help you become familiar with Map Suite. This edition of the QuickStart Guide supports Map Suite 9.0.0.0 and higher, and will show you how to create an Mobile application using Xamarin.Forms for Map Suite iOS or Android Editions. | <div msgbox>The Map Suite Xamarin.Forms illustrated QuickStart Guide will guide you through the process of creating a sample application and will help you become familiar with Map Suite. This edition of the QuickStart Guide supports Map Suite 9.0.0.0 and higher, and will show you how to create an Mobile application using Xamarin.Forms for Map Suite iOS or Android Editions. | ||
Line 13: | Line 15: | ||
===== Download the Sample ===== | ===== Download the Sample ===== | ||
- | <faicon fa fa-download fa-lg> {{:File:HelloWorld iOS.zip|Download Sample Code From This Exercise}} //(1.5 MB)// | + | <faicon fa fa-download fa-lg> {{filehistory:HelloWorld iOS.zip|Download Sample Code From This Exercise}} //(1.5 MB)// |
===== Setting up the Environment ===== | ===== Setting up the Environment ===== | ||
Line 20: | Line 22: | ||
Let's start by creating a new Forms blank app in Microsoft Visual Studio (2012 or newer) named HelloWorld (see Figure 1). We can create the project with .NET Framework 4.5 or higher. | Let's start by creating a new Forms blank app in Microsoft Visual Studio (2012 or newer) named HelloWorld (see Figure 1). We can create the project with .NET Framework 4.5 or higher. | ||
- | {{Figure|xamarin_forms_quickStart_Screenshot1.png|Figure 1. Creating a new project in the Visual Studio IDE.}} | + | {{iosedition:xamarin_forms_quickStart_Screenshot1.png|Figure 1. Creating a new project in the Visual Studio IDE.}} |
The project HelloWorld is created in a new solution called HelloWorld. The wizard creates a single blank Application(Xamarin.Forms.Portable). | The project HelloWorld is created in a new solution called HelloWorld. The wizard creates a single blank Application(Xamarin.Forms.Portable). | ||
Line 26: | Line 28: | ||
After you created a HelloWorld project, we will see three projects in the solution, please see Figure 2. | After you created a HelloWorld project, we will see three projects in the solution, please see Figure 2. | ||
- | {{Figure|xamarin_forms_quickStart_Screenshot2.png|Figure 2. A new project for Mobile App.}} | + | {{iosedition:xamarin_forms_quickStart_Screenshot2.png}} |
+ | \\ | ||
+ | //Figure 2. A new project for Mobile App.// | ||
===== Adding the Map View to our App ===== | ===== Adding the Map View to our App ===== | ||
- | We need to add MapSuiteProtableCore.dll and MapSuiteFormsEdition.dll to the “HelloWorld” project which we will work mainly. Right-click the Reference in Solution Explorer and select "Add Reference", we can find **"MapSuitePortableCore.dll"** in two products(iOS or Android) at //C:\Program Files (x86)\ThinkGeo\Map Suite 9.0\Map Suite Android[[Map|Suite iOS]]\Current Version\Managed Assemblies//. then navigate to the //C:\Program Files (x86)\ThinkGeo\Map Suite 9.0\Map Suite Xamarin Forms\Current Version\Managed Assemblies// folder and select **"MapSuiteFormsEdition.dll"**. | + | We need to add MapSuiteProtableCore.dll and MapSuiteFormsEdition.dll to the “HelloWorld” project which we will work mainly. Right-click the Reference in Solution Explorer and select "Add Reference", we can find **"MapSuitePortableCore.dll"** in two products(iOS or Android) at //C:\Program Files (x86)\ThinkGeo\Map Suite 9.0\Map Suite Android[Map Suite iOS]\Current Version\Managed Assemblies//. then navigate to the //C:\Program Files (x86)\ThinkGeo\Map Suite 9.0\Map Suite Xamarin Forms\Current Version\Managed Assemblies// folder and select **"MapSuiteFormsEdition.dll"**. |
- | {{Figure|xamarin_forms_quickStart_Screenshot3.png|Figure 3. Add Reference to HelloWorld.}} | + | {{iosedition:xamarin_forms_quickStart_Screenshot3.png}} |
+ | \\ | ||
+ | //Figure 3. Add Reference to HelloWorld.// | ||
==== Android Platform references and initialization ==== | ==== Android Platform references and initialization ==== | ||
For android platform, we need to add AndroidEdition.dll, MapSuiteFormsEdition.dll and MapSuiteFormsEdition.Android.dll to “HelloWorld.Droid” project. Right-click the Reference in Solution Explorer and select "Add Reference", navigate to the //C:\Program Files (x86)\ThinkGeo\Map Suite 9.0\Map Suite Xamarin Forms\Current Version\Managed Assemblies// folder and select **"MapSuiteFormsEdition.Android.dll"** and **"MapSuiteFormsEdition.dll"**, navigate to the //C:\Program Files (x86)\ThinkGeo\Map Suite 9.0\Map Suite Android\Current Version\Managed Assemblies// folder and select **"AndroidEdition.dll"**. | For android platform, we need to add AndroidEdition.dll, MapSuiteFormsEdition.dll and MapSuiteFormsEdition.Android.dll to “HelloWorld.Droid” project. Right-click the Reference in Solution Explorer and select "Add Reference", navigate to the //C:\Program Files (x86)\ThinkGeo\Map Suite 9.0\Map Suite Xamarin Forms\Current Version\Managed Assemblies// folder and select **"MapSuiteFormsEdition.Android.dll"** and **"MapSuiteFormsEdition.dll"**, navigate to the //C:\Program Files (x86)\ThinkGeo\Map Suite 9.0\Map Suite Android\Current Version\Managed Assemblies// folder and select **"AndroidEdition.dll"**. | ||
- | {{Figure|xamarin_forms_quickStart_Screenshot4.png|Figure 4. Add Reference to HelloWorld.Droid.}} | + | {{iosedition:xamarin_forms_quickStart_Screenshot4.png}} |
+ | \\ | ||
+ | //Figure 4. Add Reference to HelloWorld.Droid.// | ||
The next step is to Initialize MapSuiteForms, MainActivity.cs: | The next step is to Initialize MapSuiteForms, MainActivity.cs: | ||
Line 58: | Line 66: | ||
For iOS platform, we need to add iOSEdition.dll, MapSuiteFormsEdition.dll and MapSuiteFormsEdition.iOS.dll to “HelloWorld.iOS” project. Right-click the Reference in Solution Explorer and select "Add Reference", navigate to the //C:\Program Files (x86)\ThinkGeo\Map Suite 9.0\Map Suite Xamarin Forms\Current Version\Managed Assemblies// folder and select **"MapSuiteFormsEdition.dll"** and **"MapSuiteFormsEdition.iOS.dll"**, navigate to the //C:\Program Files (x86)\ThinkGeo\Map Suite 9.0\Map Suite iOS\Current Version\Managed Assemblies// folder and select **"iOSEdition.dll"**. | For iOS platform, we need to add iOSEdition.dll, MapSuiteFormsEdition.dll and MapSuiteFormsEdition.iOS.dll to “HelloWorld.iOS” project. Right-click the Reference in Solution Explorer and select "Add Reference", navigate to the //C:\Program Files (x86)\ThinkGeo\Map Suite 9.0\Map Suite Xamarin Forms\Current Version\Managed Assemblies// folder and select **"MapSuiteFormsEdition.dll"** and **"MapSuiteFormsEdition.iOS.dll"**, navigate to the //C:\Program Files (x86)\ThinkGeo\Map Suite 9.0\Map Suite iOS\Current Version\Managed Assemblies// folder and select **"iOSEdition.dll"**. | ||
- | {{Figure|xamarin_forms_quickStart_Screenshot5.png|Figure 5. Add Reference to HelloWorld.iOS.}} | + | {{iosedition:xamarin_forms_quickStart_Screenshot5.png}} |
+ | \\ | ||
+ | //Figure 5. Add Reference to HelloWorld.iOS.// | ||
The next step is to Initialize MapSuiteForms, AppDeleagte.cs: | The next step is to Initialize MapSuiteForms, AppDeleagte.cs: | ||
<code csharp> | <code csharp> | ||
- | [[Register("AppDelegate")]] | + | [Register("AppDelegate")] |
public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate | ||
{ | { | ||
Line 444: | Line 454: | ||
- | <faicon fa fa-download> {{:File:HelloWorld iOS.zip|Download Sample Code From This Exercise}} //(1.5 MB)// | + | <faicon fa fa-download fa-lg> {{filehistory:HelloWorld iOS.zip|Download Sample Code From This Exercise}} //(1.5 MB)// |