Click here to Skip to main content
Click here to Skip to main content

Travel Guider

, 25 Oct 2012
Rate this:
Please Sign up or sign in to vote.

Please note

This article is an entry in our AppInnovation Contest. Articles in this sub-section are not required to be full articles so care should be taken when voting.

Introduction

Travel Guider is an Desktop based world wide travel guide application for the latest Windows 8. By using the innovative ultrabook sensors, the app gives a rich information about the location you are searching for.

Background

Tablets and ultrabooks are the next form of the present laptops, we can now move up with the ultrabooks anywhere, in such a case, when you travel a lot, Travel Guider makes your work easy by giving up all the information the of the destination place you are looking for and also it finds how you can reach to that place.

Features

100% Offline: download a guide to enjoy it offline.

Augmented Reality: site localization and identification in the destination city.

Dynamic: activities and events adapted to the dates of your trip.

Topics guides: to suit your tastes and needs.

Calendar: daily organization for your trips.

Use of Bing Maps, Accelerometer

Using the code

1. Map

private string GetImagery(string locationString, int zoom)
{
    MapUriRequest mapUriRequest = new MapUriRequest();

    // Set credentials using a valid Bing Maps key
    mapUriRequest.Credentials = new ImageryService.Credentials();
    mapUriRequest.Credentials.ApplicationId = key;

    // Set the location of the requested image
    mapUriRequest.Center = new ImageryService.Location();
    string[] digits = locationString.Split(',');
    mapUriRequest.Center.Latitude = double.Parse(digits[0].Trim());
    mapUriRequest.Center.Longitude = double.Parse(digits[1].Trim());

    // Set the map style and zoom level
    MapUriOptions mapUriOptions = new MapUriOptions();
    mapUriOptions.Style = MapStyle.AerialWithLabels;
    mapUriOptions.ZoomLevel = zoom;

    // Set the size of the requested image in pixels
    mapUriOptions.ImageSize = new ImageryService.SizeOfint();
    mapUriOptions.ImageSize.Height = 200;
    mapUriOptions.ImageSize.Width = 300;
    mapUriRequest.Options = mapUriOptions;

    //Make the request and return the URI
    ImageryServiceClient imageryService = new ImageryServiceClient();
    MapUriResponse mapUriResponse = imageryService.GetMapUri(mapUriRequest);
    return mapUriResponse.Uri;
} 1. Map
private string GetImagery(string locationString, int zoom)
{
    MapUriRequest mapUriRequest = new MapUriRequest();

    // Set credentials using a valid Bing Maps key
    mapUriRequest.Credentials = new ImageryService.Credentials();
    mapUriRequest.Credentials.ApplicationId = key;

    // Set the location of the requested image
    mapUriRequest.Center = new ImageryService.Location();
    string[] digits = locationString.Split(',');
    mapUriRequest.Center.Latitude = double.Parse(digits[0].Trim());
    mapUriRequest.Center.Longitude = double.Parse(digits[1].Trim());

    // Set the map style and zoom level
    MapUriOptions mapUriOptions = new MapUriOptions();
    mapUriOptions.Style = MapStyle.AerialWithLabels;
    mapUriOptions.ZoomLevel = zoom;

    // Set the size of the requested image in pixels
    mapUriOptions.ImageSize = new ImageryService.SizeOfint();
    mapUriOptions.ImageSize.Height = 200;
    mapUriOptions.ImageSize.Width = 300;
    mapUriRequest.Options = mapUriOptions;

    //Make the request and return the URI
    ImageryServiceClient imageryService = new ImageryServiceClient();
    MapUriResponse mapUriResponse = imageryService.GetMapUri(mapUriRequest);
    return mapUriResponse.Uri;
}

2. Route

//Parse user data to create array of waypoints
string[] points = new string[]{start, end};
Waypoint[] waypoints = new Waypoint[points.Length];
int pointIndex = -1;

foreach (string point in points)
{
	pointIndex++;
	waypoints[pointIndex] = new Waypoint();
	string[] digits = point.Split(','); 
	waypoints[pointIndex].Location = new RouteService.Location();
	waypoints[pointIndex].Location.Latitude = double.Parse(digits[0].Trim());	
	waypoints[pointIndex].Location.Longitude = double.Parse(digits[1].Trim());

	if (pointIndex == 0)
		waypoints[pointIndex].Description = "Start";
	else if (pointIndex == points.Length)
		waypoints[pointIndex].Description = "End"
	else
		waypoints[pointIndex].Description = 
			string.Format("Stop #{0}", pointIndex);
}
routeRequest.Waypoints = waypoints;

// Make the calculate route request
RouteServiceClient routeService = new RouteServiceClient();
RouteResponse routeResponse = routeService.CalculateRoute(routeRequest);

Points of Interest

This app will surely be benefical to you while traveling.

History

version: 1.0

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Himanshu_Rathore
Software Developer Individual
India India
An engineering scholar & an .NET Developer (Silverlight & WPF). My subject of interest is developing apps for Windows Phone, Windows 8 & Azure. At free time i love doing sketching, painting & photography.
Follow on   Twitter

Comments and Discussions


| Advertise | Privacy | Mobile
Web03 | 2.8.140709.1 | Last Updated 25 Oct 2012
Article Copyright 2012 by Himanshu_Rathore
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid