When I first started working with the Bing Maps APIs, I was amazed at how easy it was to drop a map on a web page with just a few lines of code. Then I started changing the way the map looked; then I added some pushpins to show points of interest, and inevitably changed the way the pins looked.
This book describes many of these processes and much more, building on real applications as we explore new venues of the vast universe of Bing Maps.
Chapter 1, Introduction to Bing Maps AJAX Control Version 7, explains how to embed a map on a web page. It shows the way to create a custom theme by changing its interactive controls with a simple dashboard.
Chapter 2, Diving into Bing Maps AJAX Control Version 7, explains how to add interactivity to the map, by drawing custom polygons and pushpins and attaching different events to them.
Chapter 3, Introduction to Bing Maps REST Services, introduces the Locations API and reverse geocoding addresses from coordinates of any point of the map.
Chapter 4, Diving into Bing Maps REST Services, covers the Routes API and ways of fetching and displaying on the map route information between multiple places. It takes a look at different data formats that are exposed by this interface.
Chapter 5, Spatial Data Services, introduces geocoding addresses by setting up automated jobs on the Bing Maps servers. It examines techniques of monitoring the jobs, and on their completion, parsing the response.
Chapter 6, Diving into Spatial Data Services, focuses on an experimental part of Bing Maps, the Geodata API. It presents ways of obtaining geographical information about various types of administrative areas, from postcode to region or country.
Chapter 7, Enriching Bing Maps with Overlaying User Data, wraps up the book with a web application that turns the map into an interactive chart by means of user data visualizations.
You need some experience with JavaScript, HTML, and CSS. For some chapters, knowledge of C#, ASP.NET MVC, and Visual Studio is also required.
This book is for developers that wish to build applications with Bing Maps, but have no previous knowledge of the APIs. More experienced developers can find useful chapters about areas of Bing Maps with which they are not familiar.
In this book, you will find a number of styles of text that distinguish among different kinds of information. Here are some examples of these styles, and an explanation of their meaning.
Code words in text are shown as follows: We can include other contexts through the use of the include
directive.
A block of code is set as follows:
var map = new Microsoft.Maps.Map(container, { credentials: '[YOUR BING MAPS KEY]', center: new Microsoft.Maps.Location(39.554883, -99.052734), mapTypeId: Microsoft.Maps.MapTypeId.road, zoom: 4 });
When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:
8"/>
<title>LBM | Chapter 1: Introduction to Bing Maps</title>
<link href="app.css" rel="stylesheet" />
New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: Before that, we deactivate the active button (by removing the active
class) if it exists.
Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really find useful.
To send us general feedback, simply send an e-mail to <[email protected]>
, and mention the book title via the subject of your message.
If there is a topic in which you have expertise, and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.
Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.
You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.
We also provide you a PDF file that has color images of the screenshots/diagrams used in this book. The color images will help you better understand the changes in the output.You can download this file from: http://www.packtpub.com/sites/default/files/downloads/0371OT_ColoredImages.pdf
Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books; maybe a mistake in the text or the code, we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata is verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.
Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.
Please contact us at <[email protected]>
with a link to the suspected pirated material.
We appreciate your help in protecting our authors, and our ability to bring you valuable content.
You can contact us at <[email protected]>
if you are having a problem with any aspect of the book, and we will do our best to address it.