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/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/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": [ 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() {