-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
Browsers can report location data in WGS84 instead of NAD83. Using this standard, or allowing the converter to use this standard, would be great so coordinates don't need to be manipulated going into and out of this library.
I was able to work around this with the following code.
// By default, usng uses NAD83 but doesn't support WGS84. This is a workaround.
const converter = new (Converter as any)();
converter.ECC_SQUARED = 0.00669437999014;
converter.ECC_PRIME_SQUARED =
converter.ECC_SQUARED / (1 - converter.ECC_SQUARED);
converter.E1 =
(1 - Math.sqrt(1 - converter.ECC_SQUARED)) /
(1 + Math.sqrt(1 - converter.ECC_SQUARED));
Metadata
Metadata
Assignees
Labels
No labels