Point Class

Bing
 

This class is used to represent a pixel coordinate or offset. This is often used by pushpin anchors, and map location to pixel conversion calculations.

Point(x: number, y: number)

NameTypeDescription
xnumberThe x value of the point.
ynumberThe y value of the point.

The following is a list of methods that are part of the Point class.

NameReturn TypeDescription
add(point: Point)PointAdds the x and y values of two points and returns a new Point.
clone()PointReturns a copy of the Point object.
equals(point: Point, tolerance?: number)booleanCompares the x and y values of two points to see if they are equal. If a tolerance value is specified, it checks to see if the linear distance between the points is less than or equal to the tolerance value.
subtract(point: Point)PointSubtracts the x and y values of a points and returns a new Point.
toString()stringConverts the Point object into a string.
Show: