From 44ec1b3253048c9beba2e5fb9a60024482efa673 Mon Sep 17 00:00:00 2001 From: nortren Date: Fri, 11 Apr 2025 10:45:42 +0300 Subject: [PATCH 1/3] release 4.0.2 --- app/index.html | 2 +- config.main.json | 1 + src/DGAttribution/src/DGAttribution.js | 2 +- src/DGCustomization/src/DGMap.BaseLayer.js | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/index.html b/app/index.html index 172f7b68..f2da74a5 100644 --- a/app/index.html +++ b/app/index.html @@ -28,7 +28,7 @@ worldCopyJump: true, zoomControl: false, fullscreenControl: false, - key: DG.config.key || 'Your API access key', + key: DG.config.key, }; var query = parseQuery(); var map = window.map = DG.map('map', getMapOptions(query, options)); diff --git a/config.main.json b/config.main.json index 2199940a..dea1fa53 100644 --- a/config.main.json +++ b/config.main.json @@ -32,6 +32,7 @@ "secureProtocol": "https:", "baseUrl": "//maps.api.2gis.ru/2.0", + "key": "", "tileServer": "//tile{s}.maps.2gis.com/v2/tiles?x={x}&y={y}&z={z}&v=1&ts=online_sd&key={key}", "retinaTileServer": "//tile{s}.maps.2gis.com/v2/tiles?x={x}&y={y}&z={z}&v=1&ts=online_hd&key={key}", diff --git a/src/DGAttribution/src/DGAttribution.js b/src/DGAttribution/src/DGAttribution.js index 854cb5bd..3e6ae591 100644 --- a/src/DGAttribution/src/DGAttribution.js +++ b/src/DGAttribution/src/DGAttribution.js @@ -111,7 +111,7 @@ DG.Control.Attribution.include({ map._copyright = true; this._first = true; } - this._key = map.options.key; + this._key = map.options.key || DG.config.key; this._logotype = map.options.logotype; this._open2gis = this._getLink('open_link') diff --git a/src/DGCustomization/src/DGMap.BaseLayer.js b/src/DGCustomization/src/DGMap.BaseLayer.js index e33fc50a..c8ea7260 100644 --- a/src/DGCustomization/src/DGMap.BaseLayer.js +++ b/src/DGCustomization/src/DGMap.BaseLayer.js @@ -15,7 +15,7 @@ DG.Map.addInitHook(function() { } }); - var apiKey = this.options.key; + var apiKey = this.options.key || DG.config.key; this.isErrorWasShown = false; function handleTileError() { From 10a860c8a0ef5e31c1d95490c3c3a1fd51f7eded Mon Sep 17 00:00:00 2001 From: nortren Date: Fri, 11 Apr 2025 10:47:20 +0300 Subject: [PATCH 2/3] release 4.0.2 --- app/loader.js | 2 +- package-lock.json | 2 +- package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/loader.js b/app/loader.js index f2710afe..fee44645 100644 --- a/app/loader.js +++ b/app/loader.js @@ -3,7 +3,7 @@ var isJSRequested = false; var rejects = []; - var version = 'v4.0.1'; + var version = 'v4.0.2'; var baseURL = '__BASE_URL__'; var query = __QUERY__; var isLazy = query.lazy === 'true'; diff --git a/package-lock.json b/package-lock.json index da62391d..4f7f26e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "2gis-maps", - "version": "4.0.1", + "version": "4.0.2", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index d32fee29..03d27fd5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "2gis-maps", - "version": "4.0.1", + "version": "4.0.2", "description": "Interactive 2GIS maps API, based on Leaflet", "license": "SEE LICENSE IN FILE", "keywords": [ From 9f1291bd33f3123f0c50ae84c9812a2738ba644e Mon Sep 17 00:00:00 2001 From: nortren Date: Fri, 11 Apr 2025 10:48:38 +0300 Subject: [PATCH 3/3] release 4.0.2 --- app/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/index.html b/app/index.html index f2da74a5..172f7b68 100644 --- a/app/index.html +++ b/app/index.html @@ -28,7 +28,7 @@ worldCopyJump: true, zoomControl: false, fullscreenControl: false, - key: DG.config.key, + key: DG.config.key || 'Your API access key', }; var query = parseQuery(); var map = window.map = DG.map('map', getMapOptions(query, options));