Basic MAPS stuff you couldn’t code without

If you are interested in making a new app for Windows Phone 8 with Maps APIs, you can’t not know that they are divided into two namespaces:
Microsoft.Phone.Maps.Controls namespace contains the most important class of any Map-based application, Map control, with all the necessary auxiliary classes.
Microsoft.Phone.Maps.Services namespace, on the other hand, contains classes that provide location services to map-based applications.


In these two namespaces we could identify some main APIs I will report below. As long as you are not developing anything that complex, this is what you’ll need, no more (and probably no less, too).


Microsoft.Phone.Maps.Controls main APIs:

  • Map: the actual map control shown on display. May have several MapLayers and MapRoutes
  •  MapLayer: collection of MapOverlay objects
  • MapOverlay: an object on a map layer, which positions its child UIElement objects using geographic coordinates. A map marker for a point of interest and accuracy circle around current location are examples of MapOverlays.
  • MapRoute: Represents a route in the Map control. A MapRoute is created from a Route instance.

Microsoft.Phone.Maps.Services main APIs:

  • GeoCoordinate: Contains the coordinates of a location.
  • GeocodeQuery: Represents a geocode query object. Use to query locations based on a search term, such as “Seattle”. The result of GeocodeQuery is a list of MapLocations matching the search term.
  • LocationInformation: Contains the location information: MapAddress, description and name of the location.
  • MapAddress: Contains the detailed address information: country, city, postal code, street…
  • MapLocation: Represents the location information: GeoCoordinate, LocationInformation, and the bounding box of the location.
  • ReverseGeocodeQuery: Represents the reverse geocode query object. Use to query a MapLocation in a given GeoCoordinate. The result of ReverseGeocodeQuery is a list of MapLocations.
  • Route: Represents a path to be travelled between two or more waypoints. Consists of a list of RouteLegs and information on the route such as estimated duration and length in meters.
  • RouteLeg: Represents the set of actions necessary to travel between two waypoints along a route. Consists of a list of RouteManeuvers and information on the route leg such as estimated duration and length in meters.
  • RouteManeuver: Represents actions to be taken along the path of a route leg. Consists of information on the maneuveur such as type of maneuveur, instruction text, distance to the start of the next maneuveur, and geocoordinates at the start of the maneuveur.
  • RouteQuery: Represents a route query object. Use to query a route from start coordinate to an end coordinate having 0-n waypoint coordinates in between. A travel mode can be selected, either walking or driving. Route can be optimised to minimise travel or distance. The result of a query is a Route.


This said, you should be now ready to write some code and implement your first map into your first Windows Phone 8 Maps app!

Enjoy your new knowledge and happy coding! 🙂


Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:


Stai commentando usando il tuo account Chiudi sessione /  Modifica )

Google photo

Stai commentando usando il tuo account Google. Chiudi sessione /  Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione /  Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione /  Modifica )

Connessione a %s...

Questo sito utilizza Akismet per ridurre lo spam. Scopri come vengono elaborati i dati derivati dai commenti.