VEMap Class

You are not viewing the latest version of the AJAX control. Bing Maps AJAX V7 is the recommended JavaScript control for Bing Maps. If you need this documentation, it is available in as a CHM or PDF download.

Provides Bing map and search functionality to a Web page.

Constructor

Name Description

VEMap Constructor

Initializes a new instance of the VEMap object.

Public Events

The events of the VEMap Class are divided into events specific to Bing Maps, mouse events, and keyboard events. For a complete list of VEMap events, see the VEMap Events topic.

Name Description

Keyboard Events

Input events produced by the keyboard connected to the computer.

Mouse Events

Input events produced by the mouse device connected to the computer.

Bing Maps Events

The events of the VEMap Class specific to Bing Maps.

Public Methods

Name Description

VEMap.AddControl Method

Adds a custom control to the map.

VEMap.AddCustomLayer Method

Adds a custom layer to the map.

VEMap.AddShape Method

Adds an existing VEShape Class object, as specified by the shape parameter, to the base layer.

VEMap.AddShapeLayer Method

Adds the specified shape layer to the map.

VEMap.AddTileLayer Method

Adds a tile layer to the map, and if the visibleOnLoad parameter is true, it also shows it on the map.

VEMap.AttachEvent Method

Attaches a Map Control event to a specified function.

VEMap.Clear Method

Removes all shapes, shape layers, and search results on the map. Also removes the route from the map, if one is displayed.

VEMap.ClearInfoBoxStyles Method

Clears out all of the default Bing Maps info box CSS styles.

VEMap.ClearTraffic Method

Clears the traffic map.

VEMap.DeleteAllShapeLayers Method

Deletes all shape layers, along with any shapes within the layers.

VEMap.DeleteAllShapes Method

Deletes all shapes in all layers, leaving empty layers behind.

VEMap.DeleteControl Method

Removes the specified control from the map.

VEMap.DeleteRoute Method

Clears the current route, VERoute Class object, from the map.

VEMap.DeleteShape Method

Deletes a VEShape Class object from any layer, including the base map layer.

VEMap.DeleteShapeLayer Method

Deletes the specified shape layer from the map.

VEMap.DeleteTileLayer Method

Deletes a tile layer from view.

VEMap.DetachEvent Method

Detaches the specified map control event so that it no longer calls the specified function.

VEMap.Dispose Method

Deletes the VEMap object and releases any associated resources

VEMap.EnableShapeDisplayThreshold Method

Specifies whether shapes are drawn below a threshold zoom level.

VEMap.EndContinuousPan Method

Stops the continuous map panning initiated by a call to the VEMap.StartContinuousPan Method.

VEMap.Find Method

Returns an array of found results.

VEMap.FindLocations Method

Performs a search for locations that match a VELatLong Class input.

VEMap.Geocode Method

Finds a geographic location based on a specified address or place name string as well as other geocoding options.

VEMap.GetAltitude Method

In 3D mode, returns a double that represents the altitude (in meters) above the geoid.

VEMap.GetBirdseyeScene Method

If the map view is already set to bird's eye, returns the current VEBirdseyeScene Class object.

VEMap.GetCenter Method

Returns a VELatLong Class object that represents the location of the center of the current map view.

VEMap.GetDirections Method

Draws a multi-point route on the map and sends details about the route to a callback function.

VEMap.GetHeading Method

In 3D mode, returns an integer that represents the compass heading of the current map view.

VEMap.GetImageryMetadata Method

Returns information about the requested imagery, including imagery date stamps and vendor attribution.

VEMap.GetLeft Method

Returns the pixel value of the left edge of the map control.

VEMap.GetMapMode Method

Returns the current map mode.

VEMap.GetMapStyle Method

Returns the current map style.

VEMap.GetMapView Method

Returns the current map view object as a VELatLongRectangle Class object.

VEMap.GetPitch Method

In 3D mode, returns an integer that represents the pitch of the current map view.

VEMap.GetRoute Method

Deprecated. Draws a route on the map and sends details about the route to a callback function.

VEMap.GetShapeByID Method

Gets the reference to a VEShape Class object based on its internal identifier.

VEMap.GetShapeLayerByIndex Method

Gets the reference to a VEShapeLayer Class object based on its index.

VEMap.GetShapeLayerCount Method

Gets the total number of shape layers on the map.

VEMap.GetTileLayerCount Method

Gets the number of tile layers.

VEMap.GetTileLayerByID Method

Gets a tile layer based upon its identifier.

VEMap.GetTileLayerByIndex Method

Gets a tile layer based upon an index value.

VEMap.GetTop Method

Returns the pixel value of the top edge of the map control.

VEMap.GetVersion Method

Returns the current version of the map control.

VEMap.GetZoomLevel Method

Returns the current zoom level of the map.

VEMap.Hide3DNavigationControl Method

In 3D mode, hides the default user interface for controlling the map in 3D mode. By default, this control is shown.

VEMap.HideAllShapeLayers Method

Hides all of the shape layers on the map.

VEMap.HideBaseTileLayer Method

Hides the base tile layer of the map.

VEMap.HideControl Method

Hides the specified control from view.

VEMap.HideDashboard Method

Hides the default user interface for controlling the map (the compass and the zoom control).

VEMap.HideFindControl Method

Deprecated. Removes the Find control from the map.

VEMap.HideInfoBox Method

Hides a shape's custom or default info box.

VEMap.HideMiniMap Method

Hides the mini map from view.

VEMap.HideScalebar Method

Hides the scale bar from the map.

VEMap.HideTileLayer Method

Hides a tile layer from view.

VEMap.HideTrafficLegend Method

Hides the traffic legend.

VEMap.Import3DModel Method

Imports data from a Wavefront OBJ file and displays it as a 3D model on the map.

VEMap.ImportShapeLayerData Method

Imports data from a GeoRSS feed, Bing Maps (https://maps.live.com) collection, or KML URL.

VEMap.IncludePointInView Method

Changes the map view so that it includes both the specified VELatLong Class point and the center point of the current map.

VEMap.IsBirdseyeAvailable Method

Determines whether the bird's eye map style is available in the current map view.

VEMap.LatLongToPixel Method

Converts an array of VELatLong Class objects (latitude/longitude pair) to an array of VEPixel Class objects.

VEMap.LoadTraffic Method

Loads the traffic map.

VEMap.LoadMap Method

Loads the specified map. All parameters are optional.

VEMap.Pan Method

When in 2D mode, moves the map the specified amount.

VEMap.PanToLatLong Method

Pans the map to a specific latitude and longitude.

VEMap.PixelToLatLong Method

Converts a pixel (a point on the map) to a VELatLong Class object (latitude/longitude pair).

VEMap.RemoveCustomLayer Method

Removes a custom layer from the map.

VEMap.Resize Method

Resizes the map based on the specified width and height.

VEMap.Search Method

Performs a search based on a given query and options.

VEMap.SetAltitude Method

In 3D mode, sets the altitude, in meters, above the WGS 84 ellipsoid in the map view.

VEMap.SetBirdseyeOrientation Method

Changes the orientation of the existing bird's eye image (VEBirdseyeScene Class object) to the specified orientation.

VEMap.SetBirdseyeScene Method

Overloaded. Displays the specified bird's eye image.

VEMap.SetCenter Method

Centers the map to a specific latitude and longitude.

VEMap.SetCenterAndZoom Method

Centers the map to a specific latitude and longitude and sets the zoom level.

VEMap.SetClientToken Method

Sets a Bing Maps token for the VEMap object.

VEMap.SetCredentials Method

Sets the credentials to use to authenticate map service requests.

VEMap.SetDashboardSize Method

Sets the map dashboard size and type.

VEMap.SetDefaultInfoBoxStyles Method

Sets the info box CSS styles back to their original classes.

VEMap.SetFailedShapeRequest Method

Specifies what the map control does when a request to the server to get the accurate position of a shape when the map style is changed to birdseye fails.

VEMap.SetHeading Method

In 3D mode, sets the compass heading of the current map view.

VEMap.SetMapMode Method

Sets the mode of the map.

VEMap.SetMapStyle Method

Sets the style of the map.

VEMap.SetMapView Method

Sets the map view to include all of the points, lines, or polygons specified in the provided array, or to the view defined by a VEMapViewSpecification Class object.

VEMap.SetMouseWheelZoomToCenter Method

Specifies whether to zoom to the center of the screen or to the cursor position on the screen.

VEMap.SetPitch Method

In 3D mode, sets the pitch of the current map view.

VEMap.SetPrintOptions Method

Sets the print options for the current map.

VEMap.SetScaleBarDistanceUnit Method

Sets the distance unit (kilometers or miles) for the map scale.

VEMap.SetShapesAccuracy Method

Specifies the accuracy in converting shapes when the map style is changed to birdseye.

VEMap.SetShapesAccuracyRequestLimit Method

Specifies how to draw the polygons or the polylines whose points exceed the maximum limit or when a request to the server fails when the map style is changed to birdseye.

VEMap.SetTileBuffer Method

Sets the number of "rings" of map tiles that should be loaded outside of the visible mapview area.

VEMap.SetTrafficLegendText Method

Specifies the text shown with the traffic legend, if visible.

VEMap.SetZoomLevel Method

Sets the view of the map to the specified zoom level.

VEMap.Show3DBirdseye Method

Controls whether or not to show the Birdseye and BirdseyeHybrid map styles when the map mode is set to VEMapMode.Mode3D.

VEMap.Show3DNavigationControl Method

In 3D mode, shows the default user interface for controlling the map in 3D mode. By default, this control is shown.

VEMap.ShowAllShapeLayers Method

Shows all shape layers on the map.

VEMap.ShowBaseTileLayer Method

Shows the base tile layer of the map.

VEMap.ShowControl Method

Makes the specified control visible. This method only affects control elements that have been hidden from view using the VEMap.HideControl Method.

VEMap.ShowDashboard Method

Shows the default user interface for controlling the map (the compass-and-zoom control). By default, this control is shown.

VEMap.ShowDisambiguationDialog Method

Specifies whether the default disambiguation dialog is displayed when multiple results are returned from a location query.

VEMap.ShowFindControl Method

Deprecated. Shows the Find control, which enables users to enter search queries.

VEMap.ShowInfoBox Method

Shows a shape's custom or default info box.

VEMap.ShowMessage Method

Displays the specified message in a dialog box on the map.

VEMap.ShowMiniMap Method

Displays the mini map at the specified offset from the top left corner of the screen.

VEMap.ShowScalebar Method

Displays the scale bar on the map.

VEMap.ShowTileLayer Method

Shows a tile layer from view.

VEMap.ShowTrafficLegend Method

Displays the traffic legend.

VEMap.StartContinuousPan Method

Moves the map in the specified direction until the VEMap.EndContinuousPan Method is called.

VEMap.ZoomIn Method

Increases the map zoom level by 1.

VEMap.ZoomOut Method

Decreases the map zoom level by 1.

Public Properties

Name Description

VEMap.onLoadMap Property

Specifies the function to call when the map is first loaded.

See Also

Concepts

VEMap Event Object Properties