NASA-AMMOS / LithoSphere

A Tiled 3D Planetary Web-Based GIS JavaScript Library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Control - Coordinate onChange

tariqksoliman opened this issue · comments

Add an optional onChange callback parameter to the coordinate control.

Presently it can take in an element id but it only ever write lnglat coordinates to it. The use case to support is to support other coordinate types (easting/northing. relative, swap order, &c).

 this.litho.addControl(
      'myCoords',
      this.litho.controls.coordinates,
      {
          onChange: (lng, lat, elev) => { // NEW
              // Users choose how coordinates are processed
          },
      }
 )