Constructors

Properties

Methods

Constructors

  • Constructor: OpenLayers.Pixel Create a new OpenLayers.Pixel instance

    Parameters: x - {Number} The x coordinate y - {Number} The y coordinate

    Returns: An instance of OpenLayers.Pixel

    Parameters

    • x: number
    • y: number

    Returns Pixel

Properties

CLASS_NAME: string
x: number

APIProperty: x {Number} The x coordinate

y: number

APIProperty: y {Number} The y coordinate

Methods

  • APIMethod: add

    Parameters: x - {Integer} y - {Integer}

    Returns: {<OpenLayers.Pixel>} A new Pixel with this pixel's x&y augmented by the values passed in.

    Parameters

    • x: number
    • y: number

    Returns Pixel

  • APIMethod: clone Return a clone of this pixel object

    Returns: {<OpenLayers.Pixel>} A clone pixel

    Returns Pixel

  • APIMethod: distanceTo Returns the distance to the pixel point passed in as a parameter.

    Parameters: px - {<OpenLayers.Pixel>}

    Returns: {Float} The pixel point passed in as parameter to calculate the distance to.

    Parameters

    Returns number

  • APIMethod: equals Determine whether one pixel is equivalent to another

    Parameters: px - {<OpenLayers.Pixel>|Object} An OpenLayers.Pixel or an object with a 'x' and 'y' properties.

    Returns: {Boolean} The point passed in as parameter is equal to this. Note that if px passed in is null, returns false.

    Parameters

    Returns boolean

  • APIMethod: equals Determine whether one pixel is equivalent to another

    Parameters: px - {<OpenLayers.Pixel>|Object} An OpenLayers.Pixel or an object with a 'x' and 'y' properties.

    Returns: {Boolean} The point passed in as parameter is equal to this. Note that if px passed in is null, returns false.

    Parameters

    • px: { x: number; y: number }

    Returns boolean

  • APIMethod: offset

    Parameters px - {<OpenLayers.Pixel>|Object} An OpenLayers.Pixel or an object with a 'x' and 'y' properties.

    Returns: {<OpenLayers.Pixel>} A new Pixel with this pixel's x&y augmented by the x&y values of the pixel passed in.

    Parameters

    Returns Pixel

  • APIMethod: offset

    Parameters px - {<OpenLayers.Pixel>|Object} An OpenLayers.Pixel or an object with a 'x' and 'y' properties.

    Returns: {<OpenLayers.Pixel>} A new Pixel with this pixel's x&y augmented by the x&y values of the pixel passed in.

    Parameters

    • px: { x: number; y: number }

    Returns Pixel