Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Learning Bing Maps API
  • Table Of Contents Toc
Learning Bing Maps API

Learning Bing Maps API

By : Artan Sinani
4 (2)
close
close
Learning Bing Maps API

Learning Bing Maps API

4 (2)
By: Artan Sinani

Overview of this book

Provided as a part of Microsoft's Bing suite of search engines, Bing Maps is a web mapping service powered by the Bing Maps for Enterprise framework. The need for geospatial data has increased dramatically in the last few years. Adding a mapping context to any location-based data is becoming more and more common, and businesses are embracing it to improve their user experience with new data richness. Comprising of simple, follow-along examples, Learning Bing Maps API will show you how to use the many features of Bing Maps, from dropping a simple map on a web page, to fetching geospatial data from the Microsoft servers. Through the course of this book you will build a solid foundation for creating your own geo-applications.Following the hands-on recipes of this book, you will build a different web app in each chapter as you communicate with different APIs provided by Bing Maps. You will build your own library of JavaScript modules that talk to the Microsoft Maps API.You will create a custom theme for the map, with your own controls. Taking advantage of the global reach of Bing Maps, you will learn how to build a route scheduler for a delivery company in Madrid, Spain, and then you will discover how to create jobs on the Bing Maps servers for geocoding addresses in California, USA. By the end of the book you will have learned everything you need to know to embed a map on a web page, with your own geo-data, or data obtained by the Bing Map Services.
Table of Contents (14 chapters)
close
close

Chapter 2. Diving into Bing Maps AJAX Control Version 7

With the AJAX Control, we can add pins, lines, and polygons to the map. We can even add complex shapes, such as donut structures, if we load the Microsoft.Maps.AdvancedShapes module. However, the library does not have built-in tools that allow the user to draw shapes manually, so let's create one.

We will build the code we wrote in the previous chapter. This means that we have an app.js file, where we instantiate the map, and load the LearningTheme module, which customizes the look and the behavior of the map.

We will create our tool as a module, and name it ShapeDrawing. Just as we did in Chapter 1, Introduction to BING Maps AJAX Control Version 7, let's create a folder named shapeDrawing, and a JavaScript file inside it with the same name. The module skeleton is simple, as shown in the following code:

(function() {
  var lbm = window.lbm || {};
  lbm.ShapeDrawing = function(map) {
    this._map = map;
  };
  Microsoft.Maps.moduleLoaded...
Visually different images
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Learning Bing Maps API
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon