Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface webMercatorUtils

Converts Web Mercator coordinates to geographic coordinates and vice versa.

Read more...

Hierarchy

  • webMercatorUtils

Index

Methods

canProject

  • canProject(source: any, target: any): boolean
  • Returns true if the source spatial reference can be projected to the target spatial reference with the project() function, or if the source and target are the same SpatialReference.

    Read more...

    Parameters

    • source: any
    • target: any

    Returns boolean

geographicToWebMercator

  • Converts a geometry from geographic units (wkid: 4326) to Web Mercator units (wkid: 3857).

    Read more...

    Parameters

    Returns Geometry

lngLatToXY

  • lngLatToXY(long: number, lat: number): number[]
  • Translates the given latitude and longitude (decimal degree) values to Web Mercator XY values.

    Read more...

    Parameters

    • long: number
    • lat: number

    Returns number[]

project

  • Projects the geometry clientside (if possible).

    Read more...

    Parameters

    • geometry: Geometry
    • spatialReference: any

    Returns Geometry

webMercatorToGeographic

  • Converts a geometry from Web Mercator units (wkid: 3857) to geographic units (wkid: 4326).

    Read more...

    Parameters

    Returns Geometry

xyToLngLat

  • xyToLngLat(x: number, y: number): number[]
  • Translates the given Web Mercator coordinates to Longitude and Latitude values (decimal degrees).

    Read more...

    Parameters

    • x: number
    • y: number

    Returns number[]

Generated using TypeDoc