Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions src/DGCustomization/src/DGMap.BaseLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, {
Expand Down
7 changes: 7 additions & 0 deletions src/doc/en/manual/map.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ Initialize the map on the "map" div with a given center and zoom:
rendered in a <a href="/doc/maps/en/manual/vector-layers#dgsvg"><code>SVG</code></a> renderer.
</td>
</tr>
<tr id="map-protocol">
<td><code><b>protocol</b></code></td>
<td><code>String </code></td>
<td><code>''</code></td>
<td>Network protocol used in tiles requests.
</td>
</tr>
</tbody>
</table>

Expand Down
7 changes: 7 additions & 0 deletions src/doc/ru/manual/map.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,13 @@
отрисовываются с помощью <a href="/doc/maps/ru/manual/vector-layers#dgsvg"><code>SVG</code></a> рендерера.
</td>
</tr>
<tr id="map-protocol">
<td><code><b>protocol</b></code></td>
<td><code>String </code></td>
<td><code>''</code></td>
<td>Сетевой протокол, используемый в запросах к тайлам.
</td>
</tr>
</tbody>
</table>

Expand Down
Loading