HTML and CSS Reference
In-Depth Information
var pushpin = new Microsoft.Maps.Pushpin(location, null);
latLongApp.map.entities.push(pushpin);
}
Call the addPushPin method at the end of the latLongApp.display method.
latLongApp.addPushPin(mapCenter);
Figure 12-19 shows the result.
FIGURE 12-19 The current location on a map with a pushpin to denote the exact position referred to by the
coordinates.
Getting address information
The final step in the exercise consists of mapping coordinates to more usable information, such
as street address, city, and country. As mentioned, this service is built into the native Windows 8
functionality. However, by placing a direct call to the Bing service, you can get a JSON string containing
all the details.
Search WWH ::




Custom Search