This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
map_suite_windows_phone_edition_quick_start_guide [2015/09/11 02:40] admin |
map_suite_windows_phone_edition_quick_start_guide [2017/03/17 02:43] (current) tgwikiupdate |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== Map Suite Windows Phone Edition Quick Start Guide ====== | ====== Map Suite Windows Phone Edition Quick Start Guide ====== | ||
+ | |||
+ | {{section>upgrade_map_suite_to_10.0}} | ||
<div msgbox>The Map Suite Windows Phone Edition 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 Windows Phone Edition 7.0.0.0 or higher.</div> | <div msgbox>The Map Suite Windows Phone Edition 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 Windows Phone Edition 7.0.0.0 or higher.</div> | ||
Line 9: | Line 11: | ||
===== Download the Sample ===== | ===== Download the Sample ===== | ||
- | <faicon fa fa-download> {{:File:HelloWord_Windows_Phone_8_CSharp.zip|Download Sample Code From This Exercise - C#}} //(155KB)// | + | <faicon fa fa-download fa-lg> {{filehistory:HelloWord_Windows_Phone_8_CSharp.zip|Download Sample Code From This Exercise - C#}} //(155KB)// |
===== Important Note ===== | ===== Important Note ===== | ||
Before you begin, you'll need to download and install all of the tools and packages below: | Before you begin, you'll need to download and install all of the tools and packages below: | ||
- | *[[http://www.microsoft.com/visualstudio/eng/downloads|Visual Studio 2012]] | + | * [[http://www.microsoft.com/visualstudio/eng/downloads|Visual Studio 2012]] |
- | *[[http://dev.windowsphone.com/en-us/downloadsdk|Windows Phone SDK 8.0]] | + | * [[http://dev.windowsphone.com/en-us/downloadsdk|Windows Phone SDK 8.0]] |
Please check here for more detailed: [[http://msdn.microsoft.com/en-US/library/windowsphone/develop/ff626524(v=vs.105).aspx|System requirements for Windows Phone Emulator]]. | Please check here for more detailed: [[http://msdn.microsoft.com/en-US/library/windowsphone/develop/ff626524(v=vs.105).aspx|System requirements for Windows Phone Emulator]]. | ||
Line 182: | Line 184: | ||
StreamResourceInfo streamResourceInfo = Application.GetResourceStream(new Uri(fileName, UriKind.RelativeOrAbsolute)); | StreamResourceInfo streamResourceInfo = Application.GetResourceStream(new Uri(fileName, UriKind.RelativeOrAbsolute)); | ||
Stream stream = new IsolatedStorageFileStream(isolatedStorageFileName, FileMode.CreateNew, FileAccess.ReadWrite, isoStore); | Stream stream = new IsolatedStorageFileStream(isolatedStorageFileName, FileMode.CreateNew, FileAccess.ReadWrite, isoStore); | ||
- | byte[[]] bytes = new byte[[1024]]; | + | byte[] bytes = new byte[1024]; |
long blockCount = streamResourceInfo.Stream.Length / bytes.Length; | long blockCount = streamResourceInfo.Stream.Length / bytes.Length; | ||
for (int i = 0; i < blockCount; i++) | for (int i = 0; i < blockCount; i++) | ||
Line 322: | Line 324: | ||
**NOTE:** The WindowsPhone Emulator provided by “WindowsPhone SDK 8” is unable to works with http://localhost/, so here there are 2 options that we can take to work around the problem before running the application: | **NOTE:** The WindowsPhone Emulator provided by “WindowsPhone SDK 8” is unable to works with http://localhost/, so here there are 2 options that we can take to work around the problem before running the application: | ||
- | * Deploy the HelloWorldConnector site to IIS, and then access the service using http://<IP> rather than http://localhost. | + | * Deploy the HelloWorldConnector site to IIS, and then access the service using <html>http://[IP] rather than http://localhost.</html> |
* Using the IIS express in Visual Studio, in this way, we need to do more configurations in Visual Studio. Please refer to http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj684580(v=vs.105).aspx#BKMK_Settingupprojectstodemonstratetheproblemandthesolution for more detail. | * Using the IIS express in Visual Studio, in this way, we need to do more configurations in Visual Studio. Please refer to http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj684580(v=vs.105).aspx#BKMK_Settingupprojectstodemonstratetheproblemandthesolution for more detail. | ||
For example. in this Quick Start, we take the first one. We deploy the site to the test machine’s IIS and take its IP http://192.168.0.80:9000 to access the service provided by Asp.NET applicaiton, the code should be looks like as following: | For example. in this Quick Start, we take the first one. We deploy the site to the test machine’s IIS and take its IP http://192.168.0.80:9000 to access the service provided by Asp.NET applicaiton, the code should be looks like as following: | ||
- | |||
<code csharp> | <code csharp> | ||
ServerLayerOverlay serverLayerOverlay = new ServerLayerOverlay("HelloWorldOverlay", new Uri("http://192.168.0.80:9000/HellowWorldConnector.axd")); | ServerLayerOverlay serverLayerOverlay = new ServerLayerOverlay("HelloWorldOverlay", new Uri("http://192.168.0.80:9000/HellowWorldConnector.axd")); | ||
Line 335: | Line 335: | ||
Compile and run the app in the emulator and your map should look like the one below. (See Figure 16) | Compile and run the app in the emulator and your map should look like the one below. (See Figure 16) | ||
- | {{windowsphoneedition:QSG_WindowsPhone8_Img16.png?300px}} | + | {{windowsphoneedition:QSG_WindowsPhone8_Img16.png?300}} |
\\ | \\ | ||
//Figure 16. Rendering your own Shapefiles at the server side.// | //Figure 16. Rendering your own Shapefiles at the server side.// | ||
<div msgbox>Note: If you want to access the connector from a Windows Phone handset, you need to deploy the web application to a public-facing Internet Information Services (IIS) server and change the code that creates the ServerLayerOverlay to point to your server's public URL.</div> | <div msgbox>Note: If you want to access the connector from a Windows Phone handset, you need to deploy the web application to a public-facing Internet Information Services (IIS) server and change the code that creates the ServerLayerOverlay to point to your server's public URL.</div> | ||
+ | ===== Summary ===== | ||
- | ===== Summary ===== | ||
You now know the basics of using Map Suite Windows Phone Edition and are able to start adding this functionality into your own applications. As you begin developing with Map Suite, you'll want to keep the following in mind: | You now know the basics of using Map Suite Windows Phone Edition and are able to start adding this functionality into your own applications. As you begin developing with Map Suite, you'll want to keep the following in mind: | ||
- | |||
- It is of the utmost importance that the units of measurement (feet, meters, decimal degrees, etc.) be set properly for the map, based on the requirements of your data. | - It is of the utmost importance that the units of measurement (feet, meters, decimal degrees, etc.) be set properly for the map, based on the requirements of your data. | ||
- A Map is the basic class that contains all of the other objects that are used to define how the map will be rendered. | - A Map is the basic class that contains all of the other objects that are used to define how the map will be rendered. | ||
Line 349: | Line 348: | ||
- A Layer can have one-to-many ZoomLevels. ZoomLevels help to define ranges of when a layer should be shown or hidden. | - A Layer can have one-to-many ZoomLevels. ZoomLevels help to define ranges of when a layer should be shown or hidden. | ||
- | + | <faicon fa fa-download fa-lg> {{filehistory:HelloWorld Windows Phone CSharp.zip|Download Sample Code From This Exercise - C#}} //(253 KB)// | |
- | + | ||
- | <faicon fa fa-download> {{:File:HelloWorld Windows Phone CSharp.zip|Download Sample Code From This Exercise - C#}} //(253 KB)// | + |