Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
['EPSG:4326', epsg['4326']],
['EPSG:4269', epsg['4269']]
])
proj4.defs('urn:x-ogc:def:crs:EPSG:4326', proj4.defs('EPSG:4326'))
///////////////////////////////////
// Utils
///////////////////////////////////
// WGS84
proj4.WGS84
// Proj
proj4.Proj('WGS84')
// toPoint
proj4.toPoint([1, 2])
proj4.toPoint([1, 2, 3])
proj4.toPoint([1, 2, 3, 4])
// Point
// WARNING: Deprecated in v3
proj4.Point([1, 2, 3, 4])
export function wgs84ToMercator(point) {
var sourceCRS = proj4.Proj('EPSG:4326');
var destCRS = proj4.Proj('EPSG:3857');
var pt = new proj4.toPoint([point[1], point[0]]);
proj4.transform(sourceCRS, destCRS, pt);
return pt;
}
export function calcBboxFromXY(point, zoomLevel) {