Bing maps version 6.3 download






















If you are a licensed Bing Maps Enterprise Customer you can contact the Bing Maps Enterprise support team for assistance with any technical issue you have. They are available by email during EU and NA business hours.

You can find contact details for the support team here. The Bing Maps developer forums is also a good place to find migration assistance, especially if you are not an Enterprise customer with access to the Enterprise Support team. The Bing Maps developer forums are regularly monitored by community developers and by members of the Bing Maps team. You can find the Bing Maps developer forums here. If you have licensing related questions you should take them to your Bing Maps account manager if you know who they are.

If not, you can send queries to the Bing Maps licensing team and they will assist. For queries inside of North or South America you can contact them at maplic microsoft. For queries in the rest of the world you can contact them at mapemea microsoft. In addition to this regular technical posts showing how to do new and interesting things with the Bing Maps controls are made available. You can find the blog here. Both the Bing Maps v7 and v8 map controls support modules.

Version 8 is largely backwards compatible with v7. Many modules have been created by the developer community for v7 over the years. Many of these also work with v8 and many of these functionalities already exist in v8. However, there are a few modules in the Bing Maps v7 Modules CodePlex project that may not be in v8 which provide additional functionality that you may require.

Appendix A: Bing Maps v6. The table below lists every class type found in Bing Maps v6. VEClusteringOptions class. ClusterPlacementType Enumeration which is part of the Clustering module. Color or CSS color strings.

Color constructor takes in parameters. Use the PushpinOptions object to customize your pushpin icon. Additional pushpin customizations documented here. Use the navigationBarMode map option to select a different size navigation bar.

All available map types are found in the Microsoft. Use the Mini Map Module. Use the heading property of the ViewOptions object. DirectionsStep class. Use the address or location property of the Microsoft. WaypointOptions object. DirectionsRequestOptions or Microsoft. Pushpin , Microsoft. Polygon , Microsoft. Shapes can be either a Microsoft. TileSource and Microsoft. Shapes can be added to the map in two ways, directly into the entities property of the Microsoft.

Map class, or they can be added to a Microsoft. Layer which is inserted into the layers property of the map. Infoboxes can be displayed by using the setMap function of the infobox. Insert a Layer into the maps layers property. Live demo. Use the addHandler or addThrottledHandler functions of the Microsoft. Events object. Objects stored in the entities property of the Microsoft. Map class can be removed using the map. Items in a Layer can be removed using the layer.

Layers can be removed from the map by using the map. An infobox can be removed from the map by using the setMap function. Customize your own infobox using the htmlContent property of the InfoboxOptions object.

Set your options using the setOptions function of the Microsoft. Infobox class. Use the hide function of the Microsoft. Traffic Manager class to hide traffic.

Use the clear function on the maps layers property. Also use the clear function of the entities property if using that as well. Use the clearDisplay or resetDirections functions of the Microsoft. DirectionsManager Class. Use the remove or removeAt functions of the Layer class or the maps entities property. Use the remove or removeAt functions of the maps layers property,.

Use the removeHandler function of the Microsoft. Use the dispose function of the Microsoft. Map class. Use the getCenter function of the Microsoft. Use the calculateDirections function of the Microsoft. DirectionsManager class. Use the getHeading function of the Microsoft. Use the getPageX function of the Microsoft. MapTypeId Enumeration. Use the getMapTypeId function of the Microsoft. Use the functions of the Microsoft. Map class to return information about the current or target map view. Add custom properties to the metadata property of a shape.

Use the Filter class to search against the entities property of a map or within a Layer. Add custom properties to the metadata property of the TileLayer. Use the Filter class to search against the layers property of a map. Loop through the layers in the map. Use the getPageY function of the Microsoft. Use the getZoom function of the Microsoft. Loop through all layers in map. This is supported by all layer types. Set the visible property of the InfoboxOptions object to false using the setOptions function of the Microsoft.

Infobox class to hide an infobox. Use the setOptions function of the Microsoft. Map class to set the showScalebar property of the MapOptions object. Use the setVisible function on the Microsoft. TileLayer class. TrafficManager class to hide traffic. Get the bounding box of the map, and use this to create an array of locations.

Add the location that you wish to add to the view into the array. Use the LocationRect. Use the tryLocationToPixel function of the Microsoft. Initialize a Microsoft. Use the show function of the Microsoft. TrafficManager class. Use the setView function of the Microsoft.

Map class to set the center property of the ViewOptions object. Use the tryPixelToLocation function of the Microsoft. Set map view properties using the setView function of the Microsoft. Map class to set the center and zoom properties of the ViewOptions object. Use the credentials property of the MapOptions object to set the map credentials.

Your credentials are your Bing Maps Key. Use the navigationBarMode of the MapOptions object to select a navigation bar that is a different size. Note that the navigation bar automatically changes to a different size when the map is loaded on a mobile device.

Create a basic infobox using the Microsoft. Map class to set the heading property of the ViewOptions object. Map class to set the mapTypeId property of the ViewOptions object. Map class to set map view properties of the ViewOptions object. Map class to set the pitch property of the ViewOptions object.

This will change the pitch of a Streetside image. Use the showLegend or hideLegend functions of the Microsoft. Ask a question. Quick access. Search related threads.

Remove From My Forums. Answered by:. Archived Forums. Discontinued Control Migration Guidelines. Back to top. Resources Guide: Migrating Bing Maps v6. Bing Maps Silverlight Control To replace the map component within a broader Silverlight application, consider using a third-party mapping component for Silverlight as provided by one of several existing Silverlight control component providers. MapPoint EOL December 31, We have partnered with application developers who have full web-based mapping solutions available or can develop a custom application that implements Bing Maps features.

Support If you have comments or questions on this migration of components, please contact Bing Maps Developer Support. Bing Maps for Enterprise. Share this page. Contact Us. Both v6. To get a localized map using v 6. Here is an example of Paris in v6. This service can also be localized. In fact this service supports over different languages.

You can specify the language to localize the service to by including a culture parameter in the REST service request:. Click here for a complete list of supported culture codes. This section provides descriptions and examples of how to migrate your applications using the v6. Before going into great detail about any particular functionality, it is worth looking at some basic examples that demonstrate v7 equivalents for the most commonly used mapping functionality in the v6.

This section of the migration guide shows v7 equivalents for the following v6. Loading a Map. Map Navigation. Reverse Geocoding. Adding a Pushpin. Adding Shapes. Displaying Routes. In both the v6.

In order to load a map in both map APIs you have a lot of the same requirements when loading a map:. Add a div tag to the body of the page which will act as a placeholder for the map. Create a JavaScript function that gets called when the page has loaded. Create an instance of the respective map class. In both examples below we will show you how to load a basic map such that it is centered at the center of the map 0,0 and is at zoom level 1.

Before : v6. The following code is an example of how to load v6. If you run this code in a browser you should end up with a map that looks like the following image:. After : v7. In v7 things are slightly different. Rather than passing in our view settings as parameters when loading the map we instead create an object that contains the view settings and pass that as a single parameter to the map. The following code is an example of how to load Bing Maps such that it is centered at the center of the map 0,0 and is at zoom level 1.

Try this in the interactive SDK. Dynamic maps in both v6. This is a lot of functions and can be a bit confusing to figure out which one to use, especially since many of them appear to do the same thing.

The following example moves the map center to the specified location Interestingly enough you might decide that the same thing could be achieved by doing the following:. SetZoomLevel 13 ;. However, if you try this, you will find that only the zoom level changes on the map. In the v7 control, you can use the setView function to accomplish the same thing as nearly all of those functions mentioned in the v6.

The setView function takes in a set of view options which are used to define how the map should be displayed. This significantly reduces the complexity of the map control and also reduces issues like we saw in the previous example.

Location Try this in the Interactive SDK. The following examples highlight the differences in geocoding syntax between the v6. Again, we see multiple functions for doing the same thing in v6. Here is an example of a basic implementation used to geocode an address and return the results to a callback in v6.

Alternatively using the Geocode function the same thing can be done like this:. When using v7, geocoding can be accomplished using one of two methods. The first option is to use the Search module that is available in v7.

Bing Maps v7 uses modules to allow you to delay the loading of functionalities that are not needed when the application loads. This means your users will only download the functionality that they need. This will result in improved performance and allow you to delay the loading of this functionality until the user actually decides they want to geocode an address.

You can load the search module using the following code. Once the module is loaded you can use the SearchManager class in it to preform your geocode request. Here is an example of a basic implementation used to geocode an address and returns the results to a callback function in v SearchManager map ; searchManager. Tip : You can also use the Search module to perform reverse geocoding and search for points of interests in addition to geocoding addresses.

Using this method results in a lot less code being loaded into the application and also gives you access to a much larger number of supported languages. The following is a simple function you can use to geocode an address. The term geocoding generally refers to translating a human-readable address into a point on the map.

The process of doing the converse, translating a point into a human-readable address, is known as reverse geocoding. Here is an example of a basic implementation used to reverse geocode a coordinate in v6. In v7 reverse geocoding can be accomplished using one of two methods. Once the module is loaded you can use the SearchManager class in it to preform your reverse geocode request. Here is an example of a basic implementation used to reverse geocode a coordinate in v7.

The Locations API returns information about points, addresses, places, or other locations when provided with latitude and longitude coordinates. For example, the following returns Location information for the provided latitude and longitude:. The following is a simple function you can use to reverse geocode a coordinate to get an address. Both the v6. Pushpins are used to mark specific locations on a map.

The following creates a pushpin in the center of the map and makes it draggable. Pushpin, center ; pin. AddShape pin ;. In v7 there is a Pushpin class that you can use. The following creates a pushpin in the center of the map and sets the pushpin options such the pushpin is draggable. In addition to Pushpins you can also add polyline and polygon data to the map as well. The following creates a polyline from Sydney to Los Angeles and colors it purple.

Polyline, vertices ; polyline. AddShape polyline ;. In v7 there is are Polyline and Polygon classes that you can use. Note that the VEColor constructor takes in parameters as r, g, b, a whereas the Microsoft.

Color constructor takes in parameters as a, r, g, b. Also the alpha transparency in VEColor has a value between 0 and 1 where as in the Microsoft. Color a value between 0 and is used. There are a couple of things worth noticing here. First off the polyline takes the shortest distance which is across the Pacific Ocean and the most logical route. Secondly there is no pesky pushpin appear in the center of the polyline for no reason.

You can then add your shapes to the layer in a similar way to how you would add them to the map as shown here:. Pushpin, new VELatLong 0, 0 ; layer. In v7 the EntityCollection class would be used for grouping shapes together. Not only can you add pushpins, Polylines, Polygons, and Infoboxes to this collection but you can add other EntityCollections to it as well to create sub-collections. Similarly to v6. EneityCollection ; map. Pushpin new Microsoft. Location 0, 0 ; layer.

In both of the examples below, routes are calculated and drawn on the map by specifying a series of waypoints. Directions in v6. SetCredentials 'BingMapsKey' ; map.

There are two ways to get directions into Bing Maps. The first option is to use the Bing Maps Directions Module. This is an easy to use module that allows you to easily import the routing functionality into Bing Maps. In addition to being able to render a route on the map it can also generate nicely styled instructions. DirectionsManager map ;. Notice how much nicer the instructions are and how much easier it was to create them. If you are using the Bing Maps REST services with one of the Bing Maps controls you can optimize your application to reduce the number of transactions it uses.

This can be done by making use of sessions. A session occurs when a map is loaded and lasts until it is unloaded or the page it is on is refreshed. To take advantage of sessions you need to generate a session key from the map. To make things easy it is best to generate a session key right after the map loads and store it like this:.

See the Viewing Bing Maps Usage Reports documentation for more details on billable and non-billable transactions. Here are a few tips to maximize your use of sessions:. Avoid post backs that cause the page to fully reload on pages that have maps. Every time the page reloads a new session is created. Instead look at using AJAX to pull in data and make requests without refreshing the page. Keep the user on a single page. In many cases not only does keeping the user on a single page and pulling in data accordingly reduce the number of sessions created but it also makes for a much better user experience.

Generate a session key right after the map loads and store it in a global variable inside your app. This will save you time later in your application when you need to use it. This will ask the user if they would like to share their location with your application.

If you load this in a browser you will be asked if you would like to share your location. If you accept the map will then zoom in on your location and render a circle outlining the area you are similar to what is displayed in the following figure.

In Bing Maps v7 an Infobox or popup is just another entity that you can treat just like a pushpin. This gives a lot of flexibility in what can be done with the Infobox class. For example, if you want to mark a point on the map you can simply use an infobox instead of a pushpin.

This might be ideal for situations where the point you are marking is very small and the pushpin might be too large to mark the point accurately. With this added flexibility we also end up with some added complexity. Because the infobox class is treated as just another entity it is possible for them to be layered behind other entities. This can result in pushpins appearing overtop of the infobox which is usually less than ideal.

In most situations we want an infobox to appear when a user clicks on a pushpin and we expect this infobox to appear above everything else. We also expect the content of the infobox to be related to the pushpin we clicked. To accomplish this, a general best practice is to store the metadata for each pushpin as a property of it, that way when an event is fired on the pushpin you have all the metadata associated with it.

You can then use one infobox over and over again and just update the position and content when a pushpin is clicked. This will result in a lot less objects in the DOM which will help to ensure good performance.

To keep the infobox above your data an easy thing to do is create two EntityCollections, one for data and the other for infoboxes.

This will ensure that your data i. EntityCollection ; map. Infobox new Microsoft. Location 0, 30 ; pin1. Location 0, ; pin2. Title, description: e. By running this code sample and clicking on a pushpin you will end up with a map similar to this:. The Bing Maps Modular framework allows you to create reusable blocks of code that ties into Bing Maps. This saves on development time and is a great way to improve code quality by re-using proven and tested modules.

The basic overview of how to create a module. Create a single JavaScript file that contains all the code for your module. Add a call to the Bing Maps moduleLoaded event to the end of the JavaScript file containing the code to for your module, passing in the name of your module. For example:. Register your module by adding a reference to where your modular plugin JavaScript file is located.

This is often done right after the map is loaded. Load your module by calling the loadModule method in Bing Maps and passing in a callback method that will be fired when the module has been loaded. This is often done right after registering is done but can be delayed until the module is needed. Sample code of a basic module i.

Sample code of how to register and load a module i. In v7 some less frequently used features in Bing Maps v6. However, most, if not all of these can be them can be easily reproduced using the v7 API. The following is an example of how to accomplish continuous panning of the map using a time out and a simple Boolean flag to keep track of the state. Bing Maps is heavily integrated into Windows 8.

The second method is to use the JavaScript control. The following steps outline how to create a Windows Store App using an existing Bing Maps v7 web application as a starting point. Add HTML and images files into the project. Add reference to Bing Maps control in code. Update script and file references accordingly. Style Module — This is a basic module that changes the layout of the navigation control.

If required consider using the Bing Theme module. Loading Modules — To improve performance the modular framework functionality is in a separate JavaScript file. This allows developers to include this functionality only if needed.



0コメント

  • 1000 / 1000