Skip to content

Commit 62015f0

Browse files
committed
TILES-7572 add show comp POI logic
1 parent 46e77ff commit 62015f0

File tree

5 files changed

+9
-7
lines changed

5 files changed

+9
-7
lines changed

src/DGAttribution/lang/en.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
DG.Control.Attribution.Dictionary.en = {
22
license_agreement: 'License agreement',
3-
has_no_key: 'A key is required for proper operation. Please contact api@2gis.com',
3+
has_no_key: 'ReactJS API by 2GIS will become paid starting July 1. To avoid service interruption, request a key from your manager or email api@2gis.ru',
44
work_on: 'Uses 2GIS API'
55
};

src/DGAttribution/lang/ru.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
DG.Control.Attribution.Dictionary.ru = {
22
license_agreement: 'Лицензионное соглашение',
33
work_on: 'Работает на API 2ГИС',
4-
has_no_key: 'Нужен ключ для корректной работы. Обратитесь api@2gis.com',
4+
has_no_key: 'С 1 июля ReactJS API от 2ГИС станет платным. Для непрерывной работы сервиса потребуется ключ, свяжитесь с вашим менеджером или напишите на api@2gis.ru',
55
open_on: 'Открыть в 2ГИС',
66
route_on: 'Доехать с 2ГИС'
77
};

src/DGAttribution/skin/basic/less/dg-mapcopyright.less

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
color: #333 !important;
3030
font-family: Helvetica, Arial, sans-serif !important;
3131
font-weight: bold !important;
32+
white-space: normal;
3233
}
3334

3435
.dg-attribution__logo-url {

src/DGCustomization/src/DGMap.ApiKeyValidator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ DG.ApiKeyValidator = DG.Class.extend({
4848
response.result &&
4949
(!response.result.service.is_active ||
5050
!response.result.is_active ||
51-
response.result.service.status.code !== 'ok'
51+
!['ok', 'exceeded'].includes(response.result.service.status.code)
5252
)
5353
);
5454
},

src/DGCustomization/src/DGMap.BaseLayer.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,17 @@ DG.Map.addInitHook(function() {
1818
var apiKey = this.options.key || DG.config.key;
1919
var mapContainer = this.getContainer();
2020
var validator = new DG.ApiKeyValidator(apiKey, mapContainer);
21+
var showCommPoi = (this.options.showCommPoi ? '' : '&layerType=nc');
2122
validator.validateKeyResponse();
2223

23-
var tileUrl = DG.config.secureProtocol + (DG.Browser.retina ? DG.config.retinaTileServer : DG.config.tileServer);
24+
var tileUrl = DG.config.secureProtocol + (DG.Browser.retina ? DG.config.retinaTileServer : DG.config.tileServer) + showCommPoi;
2425
var arabicTileUrl = DG.config.secureProtocol +
25-
(DG.Browser.retina ? DG.config.arabicRetinaTileServer : DG.config.arabicTileServer);
26+
(DG.Browser.retina ? DG.config.arabicRetinaTileServer : DG.config.arabicTileServer) + showCommPoi;
2627

2728
var previewTileUrl = DG.config.secureProtocol +
28-
(DG.Browser.retina ? DG.config.previewRetinaTileServer : DG.config.previewTileServer);
29+
(DG.Browser.retina ? DG.config.previewRetinaTileServer : DG.config.previewTileServer) + showCommPoi;
2930
var arabicPreviewTileUrl = DG.config.secureProtocol +
30-
(DG.Browser.retina ? DG.config.arabicPreviewRetinaTileServer : DG.config.arabicPreviewTileServer);
31+
(DG.Browser.retina ? DG.config.arabicPreviewRetinaTileServer : DG.config.arabicPreviewTileServer) + showCommPoi;
3132

3233
this.baseLayer = new BaseLayer(tileUrl, {
3334
subdomains: '0123',

0 commit comments

Comments
 (0)