Socket
Socket
Sign inDemoInstall

2gis-maps

Package Overview
Dependencies
262
Maintainers
3
Versions
35
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.5.15 to 3.6.1

2

app/loader.js

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

var rejects = [];
var version = 'v3.5.15';
var version = 'v3.6.1';
var baseURL = '__BASE_URL__';

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

@@ -223,3 +223,3 @@ ## Содержание

git clone git@github.com:2gis/maps-api-2.0.git mapsapi-folder
git clone git@github.com:2gis/mapsapi.git mapsapi-folder

@@ -226,0 +226,0 @@ Примечание: если вы устанавливаете API карт не с текущего репозитория, а с его форка, тогда не забудьте указать первым параметром команды `clone` адрес форка вместо адреса репозитория 2ГИС.

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

!function(){"use strict";var n=!1,o=[],i="v3.5.15",r="__BASE_URL__",a=__QUERY__,c="true"===a.lazy,d=function(){var e={skin:a.skin,pkg:a.pkg,version:i};/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("&"),1):""}();function s(){n=!0;var e=document.createElement("script");e.setAttribute("type","text/javascript"),e.setAttribute("src",r+"/js/"+d),e.onerror=function(e){!function(){for(var e=0,t=o.length;e<t;e++)"function"==typeof o[e]&&o[e]()}()},document.getElementsByTagName("head")[0].appendChild(e)}window.DG=window.DG||{},window.DG.ready=!1,window.__dgApi__={callbacks:[[function(){DG.extend(DG.config,__LOCAL_CONFIG__),DG.customConfig&&DG.extend(DG.config,DG.customConfig)},void 0],[function(){return Promise.all([(t=r+"/css/"+d,(i=document.createElement("style")).type="text/css",new Promise(function(o,e){DG.ajax(t,{type:"get",dataType:"html",success:function(e){var t=document.getElementsByTagName("head")[0],n="https://maps.api.2gis.ru/2.0";r!==n&&(e=e.replace(new RegExp(n,"g"),r)),i.styleSheet?(t.appendChild(i),i.styleSheet.cssText=e):(i.appendChild(document.createTextNode(e)),t.appendChild(i)),o()},error:function(){e()}})})),(e=DG.config.protocol+DG.config.webApiServer+"/"+DG.config.webApiVersion+"/region/list",new Promise(function(n){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 t=e.result;t&&t.items&&t.items.length&&(DG.projectsList=t.items),n()},error:function(e){n()}})})),new Promise(function(e,t){var n=!1;function o(){document.addEventListener?(document.removeEventListener("DOMContentLoaded",o,!1),window.removeEventListener("load",o,!1)):(document.detachEvent("onreadystatechange",o),window.detachEvent("onload",o)),n||(n=!0,e())}if("loading"!==document.readyState)return o();if(document.addEventListener)document.addEventListener("DOMContentLoaded",o,!1),window.addEventListener("load",o,!1);else if(document.attachEvent){document.attachEvent("onreadystatechange",o),window.attachEvent("onload",o);var i=!1;try{i=null==window.frameElement}catch(e){}document.documentElement.doScroll&&i&&!function t(){if(!n){try{document.documentElement.doScroll("left")}catch(e){return void setTimeout(t,50)}o()}}()}})]);var e,t,i},void 0],[function(){DG.ready=!0},void 0]],version:i};var u=window.DG.then=function(e,t){return DG.then!==u?DG.then(e,t):(window.__dgApi__.callbacks.push([e,t]),c&&!n&&s(),t&&o.push(t),this)};c||s()}();
!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.6.1",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()}();
{
"name": "2gis-maps",
"version": "3.5.15",
"version": "3.6.1",
"description": "Interactive 2GIS maps API, based on Leaflet",

@@ -28,3 +28,3 @@ "license": "SEE LICENSE IN FILE",

"html5shiv": "^3.7.3",
"leaflet": "git://github.com/Leaflet/Leaflet.git#v1.0.1",
"leaflet": "1.0.1",
"express": "^4.13.4",

@@ -31,0 +31,0 @@ "cors": "^2.7.1",

@@ -19,2 +19,45 @@ // Fix a lot of bugs with pinch-zooming

// Just a copy of toPoint function
// https://github.com/Leaflet/Leaflet/blob/e079588573d0b0c649df95c3d6005373e87f323a/src/geometry/Point.js#L198-L222
function toPoint(x, y, round) {
if (x instanceof DG.Point) {
return x;
}
if (DG.Util.isArray(x)) {
return new DG.Point(x[0], x[1]);
}
if (x === undefined || x === null) {
return x;
}
if (typeof x === 'object' && 'x' in x && 'y' in x) {
return new DG.Point(x.x, x.y);
}
return new DG.Point(x, y, round);
}
// Add ability to pass HTMLElement in DG.divIcon html parameter
// See https://github.com/Leaflet/Leaflet/pull/6571
// TODO: Remove it after updating leaflet at least to v1.5.0
DG.DivIcon.include({
createIcon: function(oldIcon) {
var div = (oldIcon && oldIcon.tagName === 'DIV') ? oldIcon : document.createElement('div'),
options = this.options;
if (options.html instanceof Element) {
DG.DomUtil.empty(div);
div.appendChild(options.html);
} else {
div.innerHTML = options.html !== false ? options.html : '';
}
if (options.bgPos) {
var bgPos = toPoint(options.bgPos);
div.style.backgroundPosition = (-bgPos.x) + 'px ' + (-bgPos.y) + 'px';
}
this._setIconStyles(div, 'icon');
return div;
},
});
// Add some browser detection

@@ -21,0 +64,0 @@ DG.Browser.safari51 = DG.Browser.safari && navigator.userAgent.indexOf('Version/5.1') !== -1;

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

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