How to use the proj4.__esModule function in proj4

To help you get started, we’ve selected a few proj4 examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github OpenGeoscience / geojs / src / transform.js View on Github external
var proj4 = require('proj4');
var vec3 = require('gl-vec3');
var mat4 = require('gl-mat4');
var util = require('./util');

proj4 = proj4.__esModule ? proj4.default : proj4;
/* Ensure all projections in proj4 are included. */
var projections = require.context('proj4/projections', true, /.*\.js$/);
projections.keys().forEach(function (key) {
  proj4.Proj.projections.add(projections(key));
});

var transformCache = {};
/* Up to maxTransformCacheSize squared might be cached.  When the maximum cache
 * size is reached, the cache is completely emptied.  Since we probably won't
 * be rapidly switching between a large number of transforms, this is adequate
 * simple behavior. */
var maxTransformCacheSize = 10;

/* A RegExp to detect if two transforms only different by the middle axis's
 * direction. */
var axisPattern = new RegExp('^(.* |)\\+axis=e(n|s)u(| .*)$');
github OpenGeoscience / geojs / src / util / common.js View on Github external
var $ = require('jquery');
var proj4 = require('proj4');
proj4 = proj4.__esModule ? proj4.default : proj4;

var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';

var svgForeignObject = '<svg xmlns="http://www.w3.org/2000/svg">' +
  '' +
  '</svg>';

var m_timingData = {},
    m_timingKeepRecent = 200,
    m_threshold = 15,
    m_originalRequestAnimationFrame,
    m_htmlToImageSupport;

/**
 * Takes a variable number of arguments and returns the first numeric value

proj4

Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.

MIT
Latest version published 1 month ago

Package Health Score

86 / 100
Full package analysis

Similar packages