Migrating from Bing Maps AJAX Control 6.3 to 7.0
This topic contains information to help you migrate your Bing Maps AJAX Control 6.3 code to Bing Maps AJAX Control 7.0.
6.3 to 7.0 API Migration Tables
All Types
The table below lists every type found in the Bing Maps AJAX Control 6.3 API and provides the corresponding Bing Maps AJAX Control 7.0 type or functionality to use.
Bing Maps AJAX Control 6.3 6.3 Type |
Corresponding Bing Maps AJAX Control 7.0 Functionality |
---|---|
To set the map type to bird’s eye, use the birdseye member of the MapTypeId Enumeration. |
|
Pushpin clustering it not supported. |
|
Pushpin clustering it not supported. |
|
Pushpin clustering it not supported. |
|
Use the icon property of the PushpinOptions Object to customize your pushpin icon. |
|
Use the showDashboard and showMapTypeSelector options of the MapOptions Object to customize the map navigation control. |
|
Data import is not supported in 7.0. |
|
Both miles and kilometers are displayed on the map control. Meters are used for API measurements. |
|
An error message is returned. |
|
Due to implementation differences, there is not a need for a corresponding type. |
|
Find a location by address, point, or query using the Bing Maps REST Services and display it on the map as described in Geocoding a Location. |
|
Find a location by address, point, or query using the Bing Maps REST Services and display it on the map as described in Geocoding a Location. |
|
Find a location by address, point, or query using the Bing Maps REST Services and display it on the map as described in Geocoding a Location. |
|
Find a location by address, point, or query using the Bing Maps REST Services and display it on the map as described in Geocoding a Location. |
|
Use the Bing Maps REST Services to retrieve imagery metadata as described in the Get Imagery Metadata topic. |
|
Use the Bing Maps REST Services to retrieve imagery metadata as described in the Get Imagery Metadata topic. |
|
Find a location by address, point, or query using the Bing Maps REST Services and display it on the map as described in Geocoding a Location. |
|
3D is not supported. All available map types are found in the MapTypeId Enumeration. |
|
Find a location by address, point, or query using the Bing Maps REST Services and display it on the map as described in Geocoding a Location. |
|
Find a location by address, point, or query using the Bing Maps REST Services and display it on the map as described in Geocoding a Location. |
|
The mini map, also known as the overview map, is not supported. Add a second smaller map to your HTML page to simulate the overview map. |
|
Models are not supported. |
|
Models are not supported. |
|
Models are not supported. |
|
Models are not supported. |
|
Models are not supported. |
|
Models are not supported. |
|
Use the heading property of the ViewOptions Object. |
|
Find a location by address, point, or query using the Bing Maps REST Services and display it on the map as described in Geocoding a Location. |
|
Printing is fully supported. |
|
Use the postIntersectionHint and preIntersectionHint properties of the DirectionsStep Class. |
|
Use the itineraryItems property of the RouteLeg Class. |
|
Use the address or location property of the WaypointOptions Object. |
|
DirectionsRequestOptions Object or DirectionsRenderOptions Object |
|
Use the warnings property of the DirectionsStep Class. |
|
Use the warnings property of the DirectionsStep Class. |
|
Find a location by address, point, or query using the Bing Maps REST Services and display it on the map as described in Geocoding a Location. |
|
Shapes and other objects on the map are items in the entities collection of the Map Class, which is an EntityCollection. |
|
Due to implementation differences, there is not a need for a corresponding type. |
|
Shapes and other objects on the map are items in the entities collection of the Map Class, which is an EntityCollection. |
|
VEMap Methods
The table below lists every method found in the VEMap Class of the Bing Maps AJAX Control 6.3 and provides the corresponding Bing Maps AJAX Control 7.0 functionality to use.
VEMap Class Method |
Corresponding Bing Maps AJAX Control 7.0 Functionality |
---|---|
Use the getRootElement method of the Map Class to retrieve the map div and add your own control. |
|
Custom layers are not supported. |
|
Shapes and other objects on the map are items in the entities collection of the Map Class, which is an EntityCollection. Use the push or insert method of the EntityCollection Class to add a shape to the map. |
|
Shapes and other objects on the map are items in the entities collection of the Map Class, which is an EntityCollection. |
|
Shapes and other objects on the map are items in the entities collection of the Map Class, which is an EntityCollection. Use the push or insert method of the EntityCollection Class to add a TileLayer Class to the map. |
|
Use the addHandler or addThrottledHandler methods of the Events Object. |
|
Objects on the map are items in the entities collection of the Map Class. Use the clear method of the EntityCollection Class to clear the map. |
|
Customize your own info box using the htmlContent property of the InfoboxOptions Object. Set your options using the setOptions method of the Infobox Class. |
|
Use the hide method of the TrafficLayer Class (deprecated). |
|
Shapes and other objects on the map are items in the entities collection of the Map Class, which is an EntityCollection. Use the clear method of the EntityCollection Class to delete all shapes on the map. |
|
Shapes and other objects on the map are items in the entities collection of the Map Class, which is an EntityCollection. Use the clear method of the EntityCollection Class to delete all shapes on the map. |
|
Use the getRootElement method of the Map Class to retrieve the map div to delete the control you added. |
|
Use the clearDisplay or resetDirections methods of the DirectionsManager Class. |
|
Shapes and other objects on the map are items in the entities collection of the Map Class, which is an EntityCollection. Use the remove method of the EntityCollection Class to remove a shape from the map. |
|
Shapes and other objects on the map are items in the entities collection of the Map Class, which is an EntityCollection. |
|
Tile layers and other objects on the map are items in the entities collection of the Map Class, which is an EntityCollection. Use the remove method of the EntityCollection Class to remove a tile layer from the map. |
|
Use the removeHandler method of the Events Object. |
|
Use the dispose method of the Map Class. |
|
Shape display threshold is not supported. |
|
Use the Java Script setTimeout method and the setView method of the Map Class. Example code is found in the Appendix section at the end of this topic. |
|
Find a location by address, point, or query using the Bing Maps REST Services and display it on the map as described in Geocoding a Location. |
|
Find a location by address, point, or query using the Bing Maps REST Services and display it on the map as described in Geocoding a Location. |
|
Find a location by address, point, or query using the Bing Maps REST Services and display it on the map as described in Geocoding a Location. |
|
Use the getCenter method of the Map Class to return a Location Class, from which you can retrieve the altitude. |
|
If the MapTypeId is birdseye, use the methods of the Map Class to get information about the map view. |
|
Use the getCenter method of the Map Class. |
|
Use the calculateDirections method of the DirectionsManager Class. |
|
Use the getHeading method of the Map Class. |
|
Use the Bing Maps REST Services to retrieve imagery metadata as described in the Get Imagery Metadata topic. |
|
Use the getPageX method of the Map Class. |
|
3D is not supported. All available map types are found in the MapTypeId Enumeration. |
|
Use the getMapTypeId method of the Map Class. |
|
Use the methods of the Map Class to return information about the current or target map view. |
|
3D is not supported. |
|
Use the calculateDirections method of the DirectionsManager Class. |
|
Shapes and other objects on the map are items in the entities collection of the Map Class, which is an EntityCollection. |
|
Shapes and other objects on the map are items in the entities collection of the Map Class, which is an EntityCollection. Use the get method of the EntityCollection Class to return a shape by its index. |
|
Shapes and other objects on the map are items in the entities collection of the Map Class, which is an EntityCollection. Use the getLength method of the EntityCollection Class to return the number of items in the collection. |
|
Tile layers and other objects on the map are items in the entities collection of the Map Class, which is an EntityCollection. |
|
Tile layers and other objects on the map are items in the entities collection of the Map Class, which is an EntityCollection. Use the get method of the EntityCollection Class to return a tile layer by its index. |
|
Tile layers and other objects on the map are items in the entities collection of the Map Class, which is an EntityCollection. Use the getLength method of the EntityCollection Class to return the number of items in the collection. |
|
Use the getPageY method of the Map Class. |
|
Use the getVersion static method of the Map Class. |
|
Use the getZoom method of the Map Class. |
|
3D is not supported. |
|
Shapes and other objects on the map are items in the entities collection of the Map Class, which is an EntityCollection. Set the visible property of the EntityCollectionOptions Object to false using the setOptions method of the EntityCollection Class to hide all shapes. |
|
Use the setView method of the Map Class to set the mapTypeId property of the ViewOptions Object to mercator. |
|
Use the getRootElement method of the Map Class to retrieve the map div to hide the control you added. |
|
Use the showDashboard and showMapTypeSelector options of the MapOptions Object to customize the map navigation control. |
|
The find control is not supported. |
|
Set the visible property of the InfoboxOptions Object to false using the setOptions method of the Infobox Class to hide an info box. |
|
The mini map, also known as the overview map, is not supported. Add a second smaller map to your HTML page to simulate the overview map. |
|
The scale bar cannot be hidden. |
|
Set the visible property of the TileLayerOptions Object to false using the setOptions method of the TileLayer Class to hide a tile layer. |
|
There is no traffic legend, but you can use the hide method of the TrafficLayer Class (deprecated) to hide traffic. |
|
Models are not supported. |
|
Data import is not supported. |
|
Use the setView method of the Map Class to set the bounds of the map view to include a point.
|
|
This functionality is not supported. |
|
Use the tryLocationToPixel method of the Map Class. |
|
Initialize a Map Class. |
|
Use the show method of the TrafficLayer Class (deprecated). |
|
Use the setView method of the Map Class to set the centerOffset property of the ViewOptions Object.
|
|
Use the setView method of the Map Class to set the center property of the ViewOptions Object. |
|
Use the tryPixelToLocation method of the Map Class. |
|
Custom layers are not supported. |
|
Set the height and width properties of the MapOptions Object using the setOptions method of the Map Class. |
|
Find a location by address, point, or query using the Bing Maps REST Services and display it on the map as described in Geocoding a Location. |
|
Set map view properties using the setView method of the Map Class. |
|
Set map view properties using the setView method of the Map Class. |
|
Set map view properties using the setView method of the Map Class. |
|
Use the setView method of the Map Class to set the center property of the ViewOptions Object. |
|
Use the setView method of the Map Class to set the center and zoom properties of the ViewOptions Object. |
|
Client tokens are not supported. |
|
Use the credentials property of the MapOptions Object to set the map credentials. Your credentials are your Bing Maps Key. Information about getting a key is described in Getting a Bing Maps Key. |
|
Dashboard size modification is not supported. |
|
Create a basic info box using the Infobox Class. |
|
Due to implementation differences, there is not a need for corresponding functionality. |
|
Use the setView method of the Map Class to set the heading property of the ViewOptions Object. |
|
3D is not supported. All available map types are found in the MapTypeId Enumeration. |
|
Use the setView method of the Map Class to set the mapTypeId property of the ViewOptions Object. |
|
Use the setView method of the Map Class to set map view properties of the ViewOptions Object. |
|
The mouse wheel always zooms to the cursor position on the screen. |
|
3D is not supported. |
|
Printing is fully supported. |
|
Scale bar modification is not supported. |
|
Due to implementation differences, there is not a need for corresponding functionality. |
|
Due to implementation differences, there is not a need for corresponding functionality. |
|
Use the setOptions method of the Map Class to set the tileBuffer property of the MapOptions Object. |
|
There is no traffic legend, but use the show method of the TrafficLayer Class (deprecated) to display traffic. |
|
Use the setView method of the Map Class to set the zoom property of the ViewOptions Object. |
|
Use the setView method of the Map Classto set the mapTypeId property of the ViewOptions Object to birdseye. |
|
3D is not supported. |
|
Shapes and other objects on the map are items in the entities collection of the Map Class, which is an EntityCollection. Set the visible property of the EntityCollectionOptions Object to true using the setOptions method of the EntityCollection Class to show all shapes. |
|
By default the base tile layer is shown. If you have set the mapTypeId of the ViewOptions Object to mercator to hide the base tiles, set the mapTypeId to another map type to show the base tiles again. |
|
Use the getRootElement method of the Map Class to retrieve the map div to show a control you added. |
|
Use the showDashboard, showBreadcrumb, and showMapTypeSelector options of the MapOptions Object to customize the map navigation control. |
|
The disambiguation dialog is not supported. |
|
The find control is not supported. |
|
Add an info box to the map using the Infobox Class. |
|
Add a div to your HTML page to show a message. |
|
The mini map, also known as the overview map, is not supported. Add a second smaller map to your HTML page to simulate the overview map. |
|
Scale bar modification is not supported. |
|
Add a tile layer to the map using the TileLayer Class. |
|
There is no traffic legend, but use the show method of the TrafficLayer Class (deprecated) to display traffic. |
|
Use the Java Script setTimeout method and the setView method of the Map Class. Example code is found in the Appendix section at the end of this topic. |
|
Use the setView method of the Map Class to set the zoom property of the ViewOptions Object. |
|
Use the setView method of the Map Class to set the zoom property of the ViewOptions Object. |
Appendix
The following code shows how to simulate continuous pan in Bing Maps AJAX Control 7.0.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="https://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0"></script>
<script type="text/javascript">
var map = null;
var t = null;
var isPanning = false;
function GetMap()
{
// Initialize the map
map = new Microsoft.Maps.Map(document.getElementById("mapDiv"), {credentials:"Bing Maps Key"});
}
function StartPan()
{
if (!isPanning)
{
PanMap();
isPanning = true;
}
}
function PanMap()
{
map.setView({center: map.getCenter(), centerOffset: new Microsoft.Maps.Point(-10,0)});
t = setTimeout(PanMap, 200);
}
function EndPan()
{
clearTimeout(t);
isPanning = false;
}
</script>
</head>
<body onload="GetMap();">
<div id='mapDiv' style="position:relative; width:400px; height:400px;"></div>
<input type="button" value="Pan Map" onclick="StartPan()"/>
<input type="button" value="Stop Pan" onclick="EndPan()"/>
</body>
</html>
See Also
Bing Maps AJAX Control, Version 6.3
Bing Maps AJAX Control, Version 7.0