Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

global-mercator

Package Overview
Dependencies
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

global-mercator

Global Mercator

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
681
decreased by-59.42%
Maintainers
1
Weekly downloads
 
Created
Source

latLngToMeters

Converts given lat/lon in WGS84 Datum to XY in Spherical Mercator EPSG:900913

Parameters

  • lat number
  • lng number

Returns Meters

latLngToMeters

Converts given lat/lon in WGS84 Datum to XY in Spherical Mercator EPSG:900913

Parameters

Returns Meters

metersToLatLng

Converts XY point from Spherical Mercator EPSG:900913 to lat/lng in WGS84 Datum

Parameters

Returns LatLng

metersToLatLng

Converts XY point from Spherical Mercator EPSG:900913 to lat/lng in WGS84 Datum

Parameters

Returns LatLng

metersToPixels

Converts EPSG:900913 to pyramid pixel coordinates in given zoom level

Parameters

Returns Pixels

metersToPixels

Converts EPSG:900913 to pyramid pixel coordinates in given zoom level

Parameters

Returns Pixels

latLngToTile

Returns Tile for given latlng coordinates

Parameters

Returns Tile

latLngToTile

Returns Tile for given latlng coordinates

Parameters

Returns Tile

latLngToTile

Returns Google Tile for given latlng coordinates

Parameters

Returns Google Google Tile

latLngToGoogle

Returns Google Tile for given latlng coordinates

Parameters

Returns Google Google Tile

metersToTile

Returns Tile for given mercator coordinates

Parameters

Returns Tile

metersToTile

Returns Tile for given mercator coordinates

Parameters

Returns Tile

pixelsToMeters

Converts pixel coordinates in given zoom level of pyramid to EPSG:900913

Parameters

Returns Meters

pixelsToMeters

Converts pixel coordinates in given zoom level of pyramid to EPSG:900913

Parameters

Returns Meters

pixelsToTile

Returns a Tile covering region in given pixel coordinates

Parameters

Returns Tile

pixelsToTile

Returns a Tile covering region in given pixel coordinates

Parameters

Returns Tile

tileBounds

Returns bounds of the given Tile in EPSG:900913 coordinates

Parameters

Returns Array<number> bbox extent in [minX, minY, maxX, maxY] order

tileBounds

Returns bounds of the given Tile in EPSG:900913 coordinates

Parameters

Returns Array<number> bbox extent in [minX, minY, maxX, maxY] order

tileLatLonBounds

Returns bounds of the given Tile in EPSG:900913 coordinates

Parameters

Returns Array<number> bbox extent in [minX, minY, maxX, maxY] order

tileLatLonBounds

Returns bounds of the given Tile in EPSG:900913 coordinates

Parameters

Returns Array<number> bbox extent in [minX, minY, maxX, maxY] order

googleBounds

Converts Google Tile system in Mercator bounds (Meters)

Parameters

Returns Array<number> bbox extent in [minX, minY, maxX, maxY] order

googleBounds

Converts Google Tile system in Mercator bounds (Meters)

Parameters

Returns Array<number> bbox extent in [minX, minY, maxX, maxY] order

googleLatLonBounds

Converts Google Tile system in LatLng bounds (degrees)

Parameters

Returns Array<number> bbox extent in [minX, minY, maxX, maxY] order

googleLatLonBounds

Converts Google Tile system in LatLng bounds (degrees)

Parameters

Returns Array<number> bbox extent in [minX, minY, maxX, maxY] order

tileGoogle

Converts TMS Tile coordinates to Google Tile coordinates

Parameters

Returns Array<number> bbox extent in [minX, minY, maxX, maxY] order

tileGoogle

Converts TMS Tile coordinates to Google Tile coordinates

Parameters

Returns Array<number> bbox extent in [minX, minY, maxX, maxY] order

googleTile

Converts Google Tile coordinates to TMS Tile coordinates

Parameters

Returns Tile

googleTile

Converts Google Tile coordinates to TMS Tile coordinates

Parameters

Returns Tile

googleTile

Converts Google Tile coordinates to Microsoft QuadKey

Parameters

Returns quadkey

googleQuadKey

Converts Google Tile coordinates to Microsoft QuadKey

Parameters

Returns quadkey

tileQuadKey

Converts TMS Tile coordinates to Microsoft QuadKey

Parameters

Returns quadkey

tileQuadKey

Converts TMS Tile coordinates to Microsoft QuadKey

Parameters

Returns quadkey

quadKeyTile

Converts QuadKey to TMS Tile coordinates

Parameters

Returns Tile

quadKeyTile

Converts QuadKey to TMS Tile coordinates

Parameters

Returns Tile

quadKeyGoogle

Converts QuadKey to Google Tile

Parameters

Returns Google

quadKeyGoogle

Converts QuadKey to Google Tile

Parameters

Returns Google

boundsLatLngToMeters

Converts bounds from LatLng to Meters

Parameters

  • bounds Array<number> an Array of bounding box coordinates in the form: [xLow, yLow, xHigh, yHigh]

Returns Array<number> bounds

boundsLatLngToMeters

Converts bounds from LatLng to Meters

Parameters

  • bounds Array<number> an Array of bounding box coordinates in the form: [xLow, yLow, xHigh, yHigh]

Returns Array<number> bounds

validateUndefined

Validate Undefined

Parameters

Examples

validateUndefined('Meters', Object)

validateTile

Validates Tile

Examples

const tile = validateTile({tx: 60, ty: 80, zoom: 5})
//= {tx: 60, ty: 80, zoom: 5}

validateZoom

Validates Zoom

Examples

const zoom = validateZoom(12)
//= 12

validatePixels

Validates Pixels

Examples

const pixels = validatePixels([-115, 44])
//= [-115, 44]

validateMeters

Validates Meters

Examples

const meters = validateMeters([-115, 44])
//= [-115, 44]

validateLngLat

Validates LngLat

Examples

const lnglat = validateLngLat([-115, 44])
//= [-115, 44]

bounds

Validates bounds

Examples

const bounds = validateBounds([ -75, 44, -74, 45 ])
//= [ -75, 44, -74, 45 ]

LngLatBounds

LngLatbounds

Examples

const { bounds } = new LngLatBounds([ -75, 44, -74, 45 ])
//= [ -75, 44, -74, 45 ]

GlobalMercator

Global Mercator

Examples

const mercator = GlobalMercator()
mercator.LatLngToMeters(Tile)

constructor

Initialize the TMS Global Mercator pyramid

Parameters

  • TileSize [number](default 256) (default=256)

Resolution

Resolution (Meters/pixel) for given zoom level (measured at Equator)

Parameters

Returns number

FAQs

Package last updated on 21 Sep 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc