Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@yandex/ymaps3-web-mercator-projection

Package Overview
Dependencies
Maintainers
0
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@yandex/ymaps3-web-mercator-projection - npm Package Compare versions

Comparing version 0.0.3 to 0.0.4

dist/esm/types.js

1

dist/esm/index.js
export * from './web-mercator';
export * from './types';

2

dist/index.js

@@ -1,1 +0,1 @@

(()=>{"use strict";var t={341:function(t,e,r){var o=this&&this.__createBinding||(Object.create?function(t,e,r,o){void 0===o&&(o=r);var a=Object.getOwnPropertyDescriptor(e,r);a&&!("get"in a?!e.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,o,a)}:function(t,e,r,o){void 0===o&&(o=r),t[o]=e[r]}),a=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||o(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),a(r(95),e)},147:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.restrict=e.cycleRestrict=e.RAD_TO_DEG=e.DEG_TO_RAD=void 0,e.DEG_TO_RAD=Math.PI/180,e.RAD_TO_DEG=180/Math.PI,e.cycleRestrict=function(t,e,r){return t-Math.floor((t-e)/(r-e))*(r-e)},e.restrict=function(t,e,r){return Math.max(Math.min(t,r),e)}},95:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WebMercator=void 0;const o=r(147);e.WebMercator=class{constructor(){this._maxLatitudeRad=Math.atan(Math.sinh(Math.PI)),this.type="EPSG:3857"}toWorldCoordinates(t){return{x:this._longitudeToWorldX(t[0]),y:this._latitudeToWorldY(t[1])}}fromWorldCoordinates(t){return[this._worldXToLongitude(t.x),this._worldYToLatitude(t.y)]}_worldXToLongitude(t){return(0,o.cycleRestrict)(t*Math.PI*o.RAD_TO_DEG,-180,180)}_longitudeToWorldX(t){return(0,o.cycleRestrict)(t*o.DEG_TO_RAD/Math.PI,-1,1)}_latitudeToWorldY(t){const e=(0,o.restrict)(t*o.DEG_TO_RAD,-this._maxLatitudeRad,this._maxLatitudeRad),r=Math.tan(Math.PI/4+e/2);return(0,o.restrict)(Math.log(r)/Math.PI,-1,1)}_worldYToLatitude(t){const e=-t*Math.PI,r=Math.PI/2-2*Math.atan(Math.exp(e));return(0,o.restrict)(r*o.RAD_TO_DEG,-90,90)}}}},e={},r=function r(o){var a=e[o];if(void 0!==a)return a.exports;var i=e[o]={exports:{}};return t[o].call(i.exports,i,i.exports,r),i.exports}(341);self["@yandex/ymaps3-web-mercator-projection"]=r})();
(()=>{"use strict";var t={341:function(t,e,r){var o=this&&this.__createBinding||(Object.create?function(t,e,r,o){void 0===o&&(o=r);var a=Object.getOwnPropertyDescriptor(e,r);a&&!("get"in a?!e.__esModule:a.writable||a.configurable)||(a={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,o,a)}:function(t,e,r,o){void 0===o&&(o=r),t[o]=e[r]}),a=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||o(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),a(r(95),e),a(r(683),e)},683:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},147:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.restrict=e.cycleRestrict=e.RAD_TO_DEG=e.DEG_TO_RAD=void 0,e.DEG_TO_RAD=Math.PI/180,e.RAD_TO_DEG=180/Math.PI,e.cycleRestrict=function(t,e,r){return t-Math.floor((t-e)/(r-e))*(r-e)},e.restrict=function(t,e,r){return Math.max(Math.min(t,r),e)}},95:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WebMercator=void 0;const o=r(147);e.WebMercator=class{constructor(){this._maxLatitudeRad=Math.atan(Math.sinh(Math.PI)),this.type="EPSG:3857"}toWorldCoordinates(t){return{x:this._longitudeToWorldX(t[0]),y:this._latitudeToWorldY(t[1])}}fromWorldCoordinates(t){return[this._worldXToLongitude(t.x),this._worldYToLatitude(t.y)]}_worldXToLongitude(t){return(0,o.cycleRestrict)(t*Math.PI*o.RAD_TO_DEG,-180,180)}_longitudeToWorldX(t){return(0,o.cycleRestrict)(t*o.DEG_TO_RAD/Math.PI,-1,1)}_latitudeToWorldY(t){const e=(0,o.restrict)(t*o.DEG_TO_RAD,-this._maxLatitudeRad,this._maxLatitudeRad),r=Math.tan(Math.PI/4+e/2);return(0,o.restrict)(Math.log(r)/Math.PI,-1,1)}_worldYToLatitude(t){const e=-t*Math.PI,r=Math.PI/2-2*Math.atan(Math.exp(e));return(0,o.restrict)(r*o.RAD_TO_DEG,-90,90)}}}},e={},r=function r(o){var a=e[o];if(void 0!==a)return a.exports;var i=e[o]={exports:{}};return t[o].call(i.exports,i,i.exports,r),i.exports}(341);self["@yandex/ymaps3-web-mercator-projection"]=r})();

@@ -1,1 +0,1 @@

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["@yandex/ymaps3-web-mercator-projection"]=e():t["@yandex/ymaps3-web-mercator-projection"]=e()}(self,(()=>(()=>{"use strict";var t={341:function(t,e,r){var o=this&&this.__createBinding||(Object.create?function(t,e,r,o){void 0===o&&(o=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,o,i)}:function(t,e,r,o){void 0===o&&(o=r),t[o]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||o(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(95),e)},147:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.restrict=e.cycleRestrict=e.RAD_TO_DEG=e.DEG_TO_RAD=void 0,e.DEG_TO_RAD=Math.PI/180,e.RAD_TO_DEG=180/Math.PI,e.cycleRestrict=function(t,e,r){return t-Math.floor((t-e)/(r-e))*(r-e)},e.restrict=function(t,e,r){return Math.max(Math.min(t,r),e)}},95:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WebMercator=void 0;const o=r(147);e.WebMercator=class{constructor(){this._maxLatitudeRad=Math.atan(Math.sinh(Math.PI)),this.type="EPSG:3857"}toWorldCoordinates(t){return{x:this._longitudeToWorldX(t[0]),y:this._latitudeToWorldY(t[1])}}fromWorldCoordinates(t){return[this._worldXToLongitude(t.x),this._worldYToLatitude(t.y)]}_worldXToLongitude(t){return(0,o.cycleRestrict)(t*Math.PI*o.RAD_TO_DEG,-180,180)}_longitudeToWorldX(t){return(0,o.cycleRestrict)(t*o.DEG_TO_RAD/Math.PI,-1,1)}_latitudeToWorldY(t){const e=(0,o.restrict)(t*o.DEG_TO_RAD,-this._maxLatitudeRad,this._maxLatitudeRad),r=Math.tan(Math.PI/4+e/2);return(0,o.restrict)(Math.log(r)/Math.PI,-1,1)}_worldYToLatitude(t){const e=-t*Math.PI,r=Math.PI/2-2*Math.atan(Math.exp(e));return(0,o.restrict)(r*o.RAD_TO_DEG,-90,90)}}}},e={};return function r(o){var i=e[o];if(void 0!==i)return i.exports;var a=e[o]={exports:{}};return t[o].call(a.exports,a,a.exports,r),a.exports}(341)})()));
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports["@yandex/ymaps3-web-mercator-projection"]=e():t["@yandex/ymaps3-web-mercator-projection"]=e()}(self,(()=>(()=>{"use strict";var t={341:function(t,e,r){var o=this&&this.__createBinding||(Object.create?function(t,e,r,o){void 0===o&&(o=r);var i=Object.getOwnPropertyDescriptor(e,r);i&&!("get"in i?!e.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return e[r]}}),Object.defineProperty(t,o,i)}:function(t,e,r,o){void 0===o&&(o=r),t[o]=e[r]}),i=this&&this.__exportStar||function(t,e){for(var r in t)"default"===r||Object.prototype.hasOwnProperty.call(e,r)||o(e,t,r)};Object.defineProperty(e,"__esModule",{value:!0}),i(r(95),e),i(r(683),e)},683:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0})},147:(t,e)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.restrict=e.cycleRestrict=e.RAD_TO_DEG=e.DEG_TO_RAD=void 0,e.DEG_TO_RAD=Math.PI/180,e.RAD_TO_DEG=180/Math.PI,e.cycleRestrict=function(t,e,r){return t-Math.floor((t-e)/(r-e))*(r-e)},e.restrict=function(t,e,r){return Math.max(Math.min(t,r),e)}},95:(t,e,r)=>{Object.defineProperty(e,"__esModule",{value:!0}),e.WebMercator=void 0;const o=r(147);e.WebMercator=class{constructor(){this._maxLatitudeRad=Math.atan(Math.sinh(Math.PI)),this.type="EPSG:3857"}toWorldCoordinates(t){return{x:this._longitudeToWorldX(t[0]),y:this._latitudeToWorldY(t[1])}}fromWorldCoordinates(t){return[this._worldXToLongitude(t.x),this._worldYToLatitude(t.y)]}_worldXToLongitude(t){return(0,o.cycleRestrict)(t*Math.PI*o.RAD_TO_DEG,-180,180)}_longitudeToWorldX(t){return(0,o.cycleRestrict)(t*o.DEG_TO_RAD/Math.PI,-1,1)}_latitudeToWorldY(t){const e=(0,o.restrict)(t*o.DEG_TO_RAD,-this._maxLatitudeRad,this._maxLatitudeRad),r=Math.tan(Math.PI/4+e/2);return(0,o.restrict)(Math.log(r)/Math.PI,-1,1)}_worldYToLatitude(t){const e=-t*Math.PI,r=Math.PI/2-2*Math.atan(Math.exp(e));return(0,o.restrict)(r*o.RAD_TO_DEG,-90,90)}}}},e={};return function r(o){var i=e[o];if(void 0!==i)return i.exports;var a=e[o]={exports:{}};return t[o].call(a.exports,a,a.exports,r),a.exports}(341)})()));
export * from './web-mercator';
export * from './types';
{
"version": "0.0.3",
"version": "0.0.4",
"name": "@yandex/ymaps3-web-mercator-projection",

@@ -28,4 +28,4 @@ "description": "Yandex Maps JS API 3.0 example @yandex/ymaps3-web-mercator-projection",

"@typescript-eslint/parser": "6.0.0",
"@yandex/ymaps3-cli": "^0.0.9",
"@yandex/ymaps3-types": "^0.0.17",
"@yandex/ymaps3-cli": "^0.0.15",
"@yandex/ymaps3-types": "^0.0.27",
"cross-fetch": "4.0.0",

@@ -48,2 +48,3 @@ "css-loader": "6.8.1",

"typescript": "5.1.6",
"vue": "^3.4.38",
"webpack": "5.88.1",

@@ -50,0 +51,0 @@ "webpack-cli": "5.1.4",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc