Socket
Socket
Sign inDemoInstall

2gis-maps

Package Overview
Dependencies
263
Maintainers
9
Versions
35
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.7.3 to 3.7.4

.editorconfig

2

app/loader.js

@@ -6,3 +6,3 @@ (function() {

var rejects = [];
var version = 'v3.7.3';
var version = 'v3.7.4';
var baseURL = '__BASE_URL__';

@@ -9,0 +9,0 @@ var query = __QUERY__;

@@ -10,3 +10,3 @@ {

"trafficLayerUpdateInterval": 300000,
"ppLink2gis": "{gislink}/directions/tab/{rsType}/points/{point}?m={center}%2F{zoom}&routeLink=true",
"ppLink2gis": "{gislink}/directions/tab/{rsType}/points/|{point}?m={center}%2F{zoom}&routeLink=true",
"openLink2gis": "{gislink}/?m={center}%2F{zoom}&openLink=true",

@@ -13,0 +13,0 @@ "ppnotLink": "http://2gis.{domain}/{projectCode}/center/{center}/zoom/{zoom}/routeTab/rsType/{rsType}/to/{point}╎{name}",

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

!function(){"use strict";function e(){var e={skin:f.skin,pkg:f.pkg,version:l};/MSIE\x20(\d+\.\d+);/.test(navigator.userAgent)&&parseInt(RegExp.$1,10)<9&&(e.ie8=!0);var t=[];for(var n in e){var o=e[n];o&&t.push(n+"="+o)}return t.length?"?"+t.join("&"):""}function t(){s=!0;var e=document.createElement("script");e.setAttribute("type","text/javascript"),e.setAttribute("src",m+"/js/"+v),e.onerror=function(e){d(e)},document.getElementsByTagName("head")[0].appendChild(e)}function n(){return new Promise(function(e,t){function n(){document.addEventListener?(document.removeEventListener("DOMContentLoaded",n,!1),window.removeEventListener("load",n,!1)):(document.detachEvent("onreadystatechange",n),window.detachEvent("onload",n)),i||(i=!0,e())}function o(){if(!i){try{document.documentElement.doScroll("left")}catch(e){return void setTimeout(o,50)}n()}}var i=!1;if("loading"!==document.readyState)return n();if(document.addEventListener)document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",n),window.attachEvent("onload",n);var r=!1;try{r=null==window.frameElement}catch(a){}document.documentElement.doScroll&&r&&o()}})}function o(){var e=m+"/css/"+v,t=document.createElement("style");return t.type="text/css",new Promise(function(n,o){DG.ajax(e,{type:"get",dataType:"html",success:function(e){var o=document.getElementsByTagName("head")[0],i="https://maps.api.2gis.ru/2.0";m!==i&&(e=e.replace(new RegExp(i,"g"),m)),t.styleSheet?(o.appendChild(t),t.styleSheet.cssText=e):(t.appendChild(document.createTextNode(e)),o.appendChild(t)),n()},error:function(){o()}})})}function i(){var e=DG.config.protocol+DG.config.webApiServer+"/"+DG.config.webApiVersion+"/region/list";return new Promise(function(t){DG.ajax(e,{type:DG.ajax.corsSupport?"get":"jsonp",data:{format:DG.ajax.corsSupport?"json":"jsonp",key:DG.config.webApiKey,fields:DG.config.regionListFields},timeout:DG.config.loadProjectListTimeout,success:function(e){var n=e.result;n&&n.items&&n.items.length&&(DG.projectsList=n.items),t()},error:function(e){t()}})})}function r(){DG.extend(DG.config,__LOCAL_CONFIG__),DG.customConfig&&DG.extend(DG.config,DG.customConfig)}function a(){return Promise.all([o(),i(),n()])}function c(){DG.ready=!0}function d(){for(var e=0,t=u.length;e<t;e++)"function"==typeof u[e]&&u[e]()}var s=!1,u=[],l="v3.7.3",m="__BASE_URL__",f=__QUERY__,p="true"===f.lazy,v=e();window.DG=window.DG||{},window.DG.ready=!1,window.__dgApi__={callbacks:[[r,void 0],[a,void 0],[c,void 0]],version:l};var g=window.DG.then=function(e,n){return DG.then!==g?DG.then(e,n):(window.__dgApi__.callbacks.push([e,n]),p&&!s&&t(),n&&u.push(n),this)};p||t()}();
!function(){"use strict";function e(){var e={skin:f.skin,pkg:f.pkg,version:l};/MSIE\x20(\d+\.\d+);/.test(navigator.userAgent)&&parseInt(RegExp.$1,10)<9&&(e.ie8=!0);var t=[];for(var n in e){var o=e[n];o&&t.push(n+"="+o)}return t.length?"?"+t.join("&"):""}function t(){s=!0;var e=document.createElement("script");e.setAttribute("type","text/javascript"),e.setAttribute("src",m+"/js/"+v),e.onerror=function(e){d(e)},document.getElementsByTagName("head")[0].appendChild(e)}function n(){return new Promise(function(e,t){function n(){document.addEventListener?(document.removeEventListener("DOMContentLoaded",n,!1),window.removeEventListener("load",n,!1)):(document.detachEvent("onreadystatechange",n),window.detachEvent("onload",n)),i||(i=!0,e())}function o(){if(!i){try{document.documentElement.doScroll("left")}catch(e){return void setTimeout(o,50)}n()}}var i=!1;if("loading"!==document.readyState)return n();if(document.addEventListener)document.addEventListener("DOMContentLoaded",n,!1),window.addEventListener("load",n,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",n),window.attachEvent("onload",n);var r=!1;try{r=null==window.frameElement}catch(a){}document.documentElement.doScroll&&r&&o()}})}function o(){var e=m+"/css/"+v,t=document.createElement("style");return t.type="text/css",new Promise(function(n,o){DG.ajax(e,{type:"get",dataType:"html",success:function(e){var o=document.getElementsByTagName("head")[0],i="https://maps.api.2gis.ru/2.0";m!==i&&(e=e.replace(new RegExp(i,"g"),m)),t.styleSheet?(o.appendChild(t),t.styleSheet.cssText=e):(t.appendChild(document.createTextNode(e)),o.appendChild(t)),n()},error:function(){o()}})})}function i(){var e=DG.config.protocol+DG.config.webApiServer+"/"+DG.config.webApiVersion+"/region/list";return new Promise(function(t){DG.ajax(e,{type:DG.ajax.corsSupport?"get":"jsonp",data:{format:DG.ajax.corsSupport?"json":"jsonp",key:DG.config.webApiKey,fields:DG.config.regionListFields},timeout:DG.config.loadProjectListTimeout,success:function(e){var n=e.result;n&&n.items&&n.items.length&&(DG.projectsList=n.items),t()},error:function(e){t()}})})}function r(){DG.extend(DG.config,__LOCAL_CONFIG__),DG.customConfig&&DG.extend(DG.config,DG.customConfig)}function a(){return Promise.all([o(),i(),n()])}function c(){DG.ready=!0}function d(){for(var e=0,t=u.length;e<t;e++)"function"==typeof u[e]&&u[e]()}var s=!1,u=[],l="v3.7.4",m="__BASE_URL__",f=__QUERY__,p="true"===f.lazy,v=e();window.DG=window.DG||{},window.DG.ready=!1,window.__dgApi__={callbacks:[[r,void 0],[a,void 0],[c,void 0]],version:l};var g=window.DG.then=function(e,n){return DG.then!==g?DG.then(e,n):(window.__dgApi__.callbacks.push([e,n]),p&&!s&&t(),n&&u.push(n),this)};p||t()}();

@@ -41,2 +41,4 @@ var Server = require('karma').Server;

modulesToTest =['DGGeoclicker'];
var modulesToTestSourceList = [];

@@ -92,3 +94,4 @@

// Function localDone will be executed in the last iteration.
}, currentChunk === numberOfChunks ? localDone : startServer).start();
// }, currentChunk === numberOfChunks ? localDone : startServer).start();
}, localDone).start();
}

@@ -95,0 +98,0 @@ startServer();

{
"name": "2gis-maps",
"version": "3.7.3",
"version": "3.7.4",
"description": "Interactive 2GIS maps API, based on Leaflet",

@@ -5,0 +5,0 @@ "license": "SEE LICENSE IN FILE",

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

/**
* Компонент отвечающий за копирайт на карте. В нем выводяться различные ссылки плюс логотип или кнопка.
*
* 1. Если в опциях карты передан logotype: true то будет логотип 2GIS
* 2. Если на карте нет маркеров, то будет кнопка "Открыть в 2ГИС" и ссылка на 2ГИС (openLink2gis config.main.json)
* 3. Если на карте есть 1 маркер, то будет кнопка "Доехать с 2ГИС" и ссылка на 2ГИС с параметрами для построения маршрута до этого маркера (ppLink2gis config.main.json)
*
* Компонент подписывается на события добавления и удаления слоев в карте, метод _mapEvents).
* Если добавляется/удаляется маркер, то он добавляется/удаляется в массив _markers,
* а затем первый маркер из этого массива сохраняется в _markerToRoute.
* Поиск проезда будет предлагаться до маркера _markerToRoute.
*/
DG.Control.Attribution.include(DG.Locale);

@@ -2,0 +15,0 @@ DG.Control.Attribution.Dictionary = {};

@@ -95,9 +95,11 @@ describe('DGMap', function () {

it('should return 16', function () {
var sw = DG.latLng(54.97369439559682, 80.59043041467668),
ne = DG.latLng(54.97441793550156, 80.59262982606889),
// тут должен быть баунд территории, которая не содержить проекта,
// при этом такой, что при призуме к нему будет зум > 16
var sw = DG.latLng(67.521706581271, 97.5729274749756),
ne = DG.latLng(67.52332271114147, 97.57734775543214),
b = DG.latLngBounds(sw, ne);
expect(map.getBoundsZoom(b)).to.be(16);
expect(map.getBoundsZoom(b)).to.be(16); // 16 - это максимальный зум карты в месте где нет проекта
});
});
});

@@ -11,4 +11,9 @@ describe('DG.ProjectDetectorInit', function () {

mapContainer = document.createElement('div');
project1 = new DG.LatLng(55.00, 83.00);
desert1 = new DG.LatLng(55.00, 80.00);
// Где-то где есть проект
project1 = new DG.LatLng(54.97902673261798, 82.819265127182);
// Где-то в лесу, там где нет проекта
desert1 = new DG.LatLng(59.56, 86.32);
document.body.appendChild(mapContainer);

@@ -15,0 +20,0 @@ mapContainer.style.width = 1900 + 'px';

@@ -17,7 +17,10 @@ describe('DG.ProjectDetectorIn', function () {

start = new DG.LatLng(54.98117239821992, 82.88922250270844);
// Где-то где есть проект
project1 = new DG.LatLng(54.97902673261798, 82.819265127182);
project2 = new DG.LatLng(54.98620210307464, 73.41429233551025);
desert1 = new DG.LatLng(56.97, 81.00);
desert2 = new DG.LatLng(54.49, 79.66);
// Где-то в лесу, там где нет проекта
desert1 = new DG.LatLng(59.56, 86.32);
desert2 = new DG.LatLng(65.38, 87.39);

@@ -169,3 +172,3 @@ document.body.appendChild(mapContainer);

expect(map.setZoomAround(project2, maxZoom)).to.be(map);
expect(map.getZoom()).to.be(maxDesertZoom);
expect(map.getZoom()).to.be(maxZoom);
});

@@ -172,0 +175,0 @@

@@ -17,7 +17,10 @@ describe('DG.ProjectDetectorOut', function () {

start = new DG.LatLng(54.98117239821992, 360 + 82.88922250270844);
// Где-то где есть проект
project1 = new DG.LatLng(54.97902673261798, 360 + 82.819265127182);
project2 = new DG.LatLng(54.98620210307464, 360 + 73.41429233551025);
desert1 = new DG.LatLng(55.00, 360 + 80.00);
desert2 = new DG.LatLng(61.00, 360 + 90.00);
// Где-то в лесу, там где нет проекта
desert1 = new DG.LatLng(59.56, 360 + 86.32);
desert2 = new DG.LatLng(65.38, 360 + 87.39);

@@ -169,3 +172,3 @@ document.body.appendChild(mapContainer);

expect(map.setZoomAround(project2, maxZoom)).to.be(map);
expect(map.getZoom()).to.be(maxDesertZoom);
expect(map.getZoom()).to.be(maxZoom);
});

@@ -172,0 +175,0 @@

@@ -17,7 +17,10 @@ describe('DG.ProjectDetectorUnder', function () {

start = new DG.LatLng(54.98117239821992, 82.88922250270844);
// Где-то где есть проект
project1 = new DG.LatLng(54.97902673261798, 82.819265127182);
project2 = new DG.LatLng(54.98620210307464, 73.41429233551025);
desert1 = new DG.LatLng(55.00, 80.00);
desert2 = new DG.LatLng(61.00, 90.00);
// Где-то в лесу, там где нет проекта
desert1 = new DG.LatLng(59.56, 86.32);
desert2 = new DG.LatLng(65.38, 87.39);

@@ -169,3 +172,3 @@ document.body.appendChild(mapContainer);

expect(map.setZoomAround(project2, maxZoom)).to.be(map);
expect(map.getZoom()).to.be(maxDesertZoom);
expect(map.getZoom()).to.be(maxZoom);
});

@@ -398,3 +401,2 @@

describe('#isProjectHere', function () {
it('without params', function () {

@@ -401,0 +403,0 @@ expect(map.projectDetector.isProjectHere()).to.not.be.ok();

@@ -58,3 +58,3 @@ ## 2GIS Project Detection Module

<tr>
<td>getProjectList</td>
<td>getProjectsList</td>
<td>Object</td>

@@ -61,0 +61,0 @@ <td>Returns all available projects.</td>

@@ -58,3 +58,3 @@ ## Модуль определения проекта 2GIS

<tr>
<td>getProjectList</td>
<td>getProjectsList</td>
<td>Object</td>

@@ -61,0 +61,0 @@ <td>Возвращает все доступные проекты.</td>

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc