File tree Expand file tree Collapse file tree 3 files changed +24
-4
lines changed
Expand file tree Collapse file tree 3 files changed +24
-4
lines changed Original file line number Diff line number Diff line change @@ -21,13 +21,19 @@ DG.Map.addInitHook(function() {
2121 var showCommPoi = ( this . options . showCommPoi ? '' : '&layerType=nc' ) ;
2222 validator . validateKeyResponse ( ) ;
2323
24- var tileUrl = DG . config . secureProtocol + ( DG . Browser . retina ? DG . config . retinaTileServer : DG . config . tileServer ) + showCommPoi ;
25- var arabicTileUrl = DG . config . secureProtocol +
24+ let protocol = this . options . protocol || DG . config . secureProtocol ;
25+ // Check that last symbol is colon, and if not add it
26+ if ( protocol [ protocol . length - 1 ] !== ':' ) {
27+ protocol = protocol + ':' ;
28+ }
29+
30+ var tileUrl = protocol + ( DG . Browser . retina ? DG . config . retinaTileServer : DG . config . tileServer ) + showCommPoi ;
31+ var arabicTileUrl = protocol +
2632 ( DG . Browser . retina ? DG . config . arabicRetinaTileServer : DG . config . arabicTileServer ) + showCommPoi ;
2733
28- var previewTileUrl = DG . config . secureProtocol +
34+ var previewTileUrl = protocol +
2935 ( DG . Browser . retina ? DG . config . previewRetinaTileServer : DG . config . previewTileServer ) + showCommPoi ;
30- var arabicPreviewTileUrl = DG . config . secureProtocol +
36+ var arabicPreviewTileUrl = protocol +
3137 ( DG . Browser . retina ? DG . config . arabicPreviewRetinaTileServer : DG . config . arabicPreviewTileServer ) + showCommPoi ;
3238
3339 this . baseLayer = new BaseLayer ( tileUrl , {
Original file line number Diff line number Diff line change @@ -66,6 +66,13 @@ Initialize the map on the "map" div with a given center and zoom:
6666 rendered in a <a href="/doc/maps/en/manual/vector-layers#dgsvg"><code>SVG</code></a> renderer.
6767 </td>
6868 </tr>
69+ <tr id="map-protocol">
70+ <td><code><b>protocol</b></code></td>
71+ <td><code>String </code></td>
72+ <td><code>''</code></td>
73+ <td>Network protocol used in tiles requests.
74+ </td>
75+ </tr>
6976 </tbody>
7077</table >
7178
Original file line number Diff line number Diff line change 6767 отрисовываются с помощью <a href="/doc/maps/ru/manual/vector-layers#dgsvg"><code>SVG</code></a> рендерера.
6868 </td>
6969 </tr>
70+ <tr id="map-protocol">
71+ <td><code><b>protocol</b></code></td>
72+ <td><code>String </code></td>
73+ <td><code>''</code></td>
74+ <td>Сетевой проток, используемый в запросах к тайлам.
75+ </td>
76+ </tr>
7077 </tbody>
7178</table >
7279
You can’t perform that action at this time.
0 commit comments