feat: expand intelligent investigation workspace
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
const WEB_MERCATOR_RADIUS = 6378137;
|
||||
|
||||
export function webMercatorToLngLat(x: number, y: number): [number, number] {
|
||||
const lng = (x / WEB_MERCATOR_RADIUS) * (180 / Math.PI);
|
||||
const lat = (2 * Math.atan(Math.exp(y / WEB_MERCATOR_RADIUS)) - Math.PI / 2) * (180 / Math.PI);
|
||||
return [lng, lat];
|
||||
}
|
||||
@@ -64,3 +64,4 @@ export {
|
||||
export { MapScaleLine } from "./components/scale-line";
|
||||
export { MapToolbar, type MapToolbarItem } from "./components/toolbar";
|
||||
export { MapZoom } from "./components/zoom";
|
||||
export { webMercatorToLngLat } from "./coordinates";
|
||||
|
||||
Reference in New Issue
Block a user