# toMap

return type | Array (GeoJSON positions)
syntax | .geomap( "toMap", Array pixelPositions )

usage

    var mapPos = $("#map").geomap( "toMap", [ 120, 240 ] )
    var mapPositions = $("#map").geomap( "toMap", [ [ 120, 240 ], [ 192, 48 ] ] )

The toMap method takes a single pixel position (which is an array of two values: the left and top of the pixel), an array of pixel positions, an array of arrays of pixel positions, or an array of arrays of arrays of pixel positions. In other words, it accepts the pixel representation of the coordinates of any geometry up to MultiPolygon. It returns the map coordinates for all of the pixel positions.

The return coordinates are in projected map units if you have previously set the bbox or center options using projected coordinates. Otherwise, they are in geodetic (lon, lat) coordinates.