Skip to content

Commit ac570c9

Browse files
committed
fix after review
1 parent 215f25c commit ac570c9

File tree

4 files changed

+6
-8
lines changed

4 files changed

+6
-8
lines changed

app/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
worldCopyJump: true,
2929
zoomControl: false,
3030
fullscreenControl: false,
31-
key: DG.config.key || 'Your API access key',
31+
key: '',
3232
};
3333
var query = parseQuery();
3434
var map = window.map = DG.map('map', getMapOptions(query, options));

config.main.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"secureProtocol": "https:",
3333

3434
"baseUrl": "//maps.api.2gis.ru/2.0",
35-
"key": "",
35+
"key": "c5e4d7ec-f9d0-470f-b7f0-278f622f20e2",
3636

3737
"keyServer": "https://keys.api.2gis.com/public/v1/keys/",
3838
"keyServices": "/services/tiles-raster-api",

src/DGAttribution/src/DGAttribution.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ DG.Control.Attribution.include({
111111
map._copyright = true;
112112
this._first = true;
113113
}
114-
this._key = map.options.key || DG.config.key;
114+
// TODO у нас на бекенде сейчас пустой ключ и пока мы его не добавили будет браться ключ по дефолту из конфигов, как только мы его туда положим копирайт об ошибке пропадёт потом можно убрать без последствий
115+
this._freeKey = 'c5e4d7ec-f9d0-470f-b7f0-278f622f20e2';
116+
this._key = map.options.key || DG.config.key !== this._freeKey;
115117
this._logotype = map.options.logotype;
116118
this._open2gis = this._getLink('open_link')
117119

src/DGCustomization/src/DGMap.BaseLayer.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,8 @@ DG.Map.addInitHook(function() {
3737

3838
var validator = new DG.ApiKeyValidator(apiKey);
3939
validator.validate(function(response) {
40-
// TODO пока на 400 ошибку (пользователь без ключа) не показываем ошибку (на релизе уже показываем)
41-
if (response.meta.code === 400 || !response.result) {
42-
return;
43-
}
4440

45-
if (!response.result.service.is_active || !response.result.is_active || response.result.service.status.code !== 'ok') {
41+
if (response.meta.code === 400 || !response.result.service.is_active || !response.result.is_active || response.result.service.status.code !== 'ok') {
4642
handleTileError.call(this);
4743
}
4844
});

0 commit comments

Comments
 (0)