Export (0) Print
Expand All

VEShape Constructor

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.

Initializes a new instance of the VEShape class.


var x = new VEShape(type, points);

Parameters

Parameter Description

type

A VEShapeType Enumeration value of type that represents the type of shape. Required.

points

If the shape is a pushpin, this parameter can either be a single VELatLong Class object or an array of VELatLong objects. If it is an array of VELatLong objects, only the first VELatLong object is used to define the pushpin's location. Any additional data members are ignored. If the shape is a polyline or polygon, it must be an array of VELatLong objects, containing at least two points for a polyline and at least three points for a polygon. Required.

A VEMap Class object must be instantiated before a VEShape object can be created.

All shapes must be contained in a layer. Any shape added using the VEMap.AddShape Method is added to the map's base layer. This base layer is always located at index 0 and cannot be deleted. Any shape added using a VEShapeLayer.AddShape Method is added to that specific layer.

If the points parameter contains an array of VELatLong objects and any of those objects has an altitude, the altitudes of the other VELatLong objects either be the same value or null.

Show:
© 2014 Microsoft