Pixel
AMap.Pixel
Pixel coordinates, determine a pixel point on the map. Construct a pixel coordinate object
new AMap.Pixel(x: number, y: number);Parameter
Demo
var pixel = new AMap.Pixel(600, 300); //Container coordinates, origin at the top-left cornerMethod
getX()
Get pixel X-coordinate
return value:(Number) The x-axis pixel coordinate of the pixel
Demo:
pixel.getX();getY()
Get the y-coordinate of the pixel
return value:(Number) The y-axis pixel coordinate of the pixel
Demo:
pixel.getY();toString()
Return the pixel coordinate object as a string
return value:(String) Pixel coordinates in string format
Demo:
pixel.toString();