diff --git a/src/DGCustomization/src/DGMap.BaseLayer.js b/src/DGCustomization/src/DGMap.BaseLayer.js index 64b650c0..2fccd9f0 100644 --- a/src/DGCustomization/src/DGMap.BaseLayer.js +++ b/src/DGCustomization/src/DGMap.BaseLayer.js @@ -21,13 +21,19 @@ DG.Map.addInitHook(function() { var showCommPoi = (this.options.showCommPoi ? '' : '&layerType=nc'); validator.validateKeyResponse(); - var tileUrl = DG.config.secureProtocol + (DG.Browser.retina ? DG.config.retinaTileServer : DG.config.tileServer) + showCommPoi; - var arabicTileUrl = DG.config.secureProtocol + + var protocol = this.options.protocol || DG.config.secureProtocol; + // Check that last symbol is colon, and if not add it + if (protocol[protocol.length - 1] !== ':') { + protocol = protocol + ':'; + } + + var tileUrl = protocol + (DG.Browser.retina ? DG.config.retinaTileServer : DG.config.tileServer) + showCommPoi; + var arabicTileUrl = protocol + (DG.Browser.retina ? DG.config.arabicRetinaTileServer : DG.config.arabicTileServer) + showCommPoi; - var previewTileUrl = DG.config.secureProtocol + + var previewTileUrl = protocol + (DG.Browser.retina ? DG.config.previewRetinaTileServer : DG.config.previewTileServer) + showCommPoi; - var arabicPreviewTileUrl = DG.config.secureProtocol + + var arabicPreviewTileUrl = protocol + (DG.Browser.retina ? DG.config.arabicPreviewRetinaTileServer : DG.config.arabicPreviewTileServer) + showCommPoi; this.baseLayer = new BaseLayer(tileUrl, { diff --git a/src/doc/en/manual/map.md b/src/doc/en/manual/map.md index fa761b07..b768485a 100644 --- a/src/doc/en/manual/map.md +++ b/src/doc/en/manual/map.md @@ -66,6 +66,13 @@ Initialize the map on the "map" div with a given center and zoom: rendered in a SVG renderer. + + protocol + String + '' + Network protocol used in tiles requests. + + diff --git a/src/doc/ru/manual/map.md b/src/doc/ru/manual/map.md index 722171ae..72631492 100644 --- a/src/doc/ru/manual/map.md +++ b/src/doc/ru/manual/map.md @@ -67,6 +67,13 @@ отрисовываются с помощью SVG рендерера. + + protocol + String + '' + Сетевой протокол, используемый в запросах к тайлам. + +