Skip to content

Commit

Permalink
Merge pull request #11 from 2gis/JSAPI-3736
Browse files Browse the repository at this point in the history
Верифицировать отдачу по https
  • Loading branch information
ilfa committed Sep 23, 2014
2 parents 0b326bf + 6c35fb4 commit 525cced
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 11 deletions.
2 changes: 2 additions & 0 deletions app.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//Web app of 2GIS Maps API 2.0
var express = require('express'),
cluster = require('cluster'),
cors = require('cors'),
cpuCount = require('os').cpus().length,
clc = require('cli-color'),
config = require(__dirname + '/build/config.js').appConfig;
Expand All @@ -11,6 +12,7 @@ var app = express();
//General configuration of the application
app.set('port', config.PORT || '3000');
app.set('host', config.HOST || null);
app.use(cors());
app.use(express.static(__dirname + '/public'));

//Routes
Expand Down
16 changes: 10 additions & 6 deletions config.main.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,26 @@
"BASE_URL": "",
"DEFAULT_SKIN": "dark",

"TILE_SERVER": "https://tile{s}.maps.2gis.com/tiles?x={x}&y={y}&z={z}&v=1",
"TILE_SERVER": "//tile{s}.maps.2gis.com/tiles?x={x}&y={y}&z={z}&v=1",

"TRAFFIC_TILE_SERVER": "//traffic{s}.maps.2gis.com/{projectCode}/traffic/{z}/{x}/{y}/speed/{period}/{timestampString}",
"TRAFFIC_META_SERVER": "//meta{s}.maps.2gis.com/{projectCode}/meta/{z}/{x}/{y}/graph_speed/{period}/{timestampString}",
"TRAFFIC_TIMESTAMP_SERVER": "//traffic{s}.maps.2gis.com/{projectCode}/meta/speed/time/",

"TRAFFIC_TILE_SERVER" : "http://traffic{s}.2gis.ru/{projectCode}/traffic/{z}/{x}/{y}/speed/{period}/{timestampString}",
"TRAFFIC_META_SERVER" : "http://meta{s}.2gis.ru/{projectCode}/meta/{z}/{x}/{y}/graph_speed/{period}/{timestampString}",
"TRAFFIC_TIMESTAMP_SERVER" : "http://traffic{s}.2gis.ru/{projectCode}/meta/speed/time/",
"TRAFFIC_LAYER_MIN_ZOOM": 10,
"TRAFFIC_LAYER_UPDATE_INTERVAL": 300000,

"DETECT_RETINA": true,

"PPNOT_LINK": "http://2gis.ru/{projectCode}/center/{center}/zoom/{zoom}/routeTab/rsType/{rsType}/to/{point}╎{name}",
"PHOTOS_LINK": "http://2gis.ru/photos/{id}",

"HIGHLIGHT_POI_SERVER": "http://tile{s}.maps.2gis.ru/?x={x}&y={y}&z={z}&v=1&type=poi",
"POI_META_SERVER": "//tile{s}.maps.2gis.com/?x={x}&y={y}&z={z}&v=1&type=poi",
"POI_LAYER_MIN_ZOOM": 15,

"WEB_API_SERVER": "http://catalog.api.2gis.ru",
"DETECT_RETINA": true,

"WEB_API_SERVER": "//catalog.api.2gis.ru",
"WEB_API_KEY": "rujrdp3400",
"WEB_API_VERSION": "2.0",
"FIRM_INFO_FIELDS": "data.reviews,data.geo.id,data.photos",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"url": "git://github.com/2gis/maps-api-2.0.git"
},
"dependencies": {
"cors": "^2.4.1",
"chalk": "0.4.0",
"cli-color": "0.3.2",
"cluster": "0.7.7",
Expand Down
2 changes: 1 addition & 1 deletion private/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<script src="http://maps.api.2gis.ru/2.0/loader.js" data-id="dgLoader"></script>
<script src="//maps.api.2gis.ru/2.0/loader.js" data-id="dgLoader"></script>
<style type="text/css">
html,body { height: 100%; margin: 0px; padding: 0px; }
#map { width: 100%; height: 100%; }
Expand Down
2 changes: 1 addition & 1 deletion src/DGAjax/src/DGAjax.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ DG.ajax = (function () {
var win = window,
doc = document,

rurl = /^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
rurl = /^([\w.+-]+:)?(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,
twoHundo = /^20\d$/,

// Document location
Expand Down
2 changes: 1 addition & 1 deletion src/DGCore/src/DGCore.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ ga('send', 'pageview');

//track statistics
var newImg = new Image();
newImg.src = 'http://maps.api.2gis.ru/analytics/track-user.png?' +
newImg.src = '//maps.api.2gis.ru/analytics/track-user.png?' +
'sr=' + window.screen.width + 'x' + window.screen.height + '&' +
'v=' + DG.version;

Expand Down
2 changes: 1 addition & 1 deletion src/DGMeta/src/DGMeta.Origin.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
DG.Meta.Origin = DG.Class.extend({

options: {
subdomains: '012345679',
subdomains: '0123',
dataFilter: null
},

Expand Down
2 changes: 1 addition & 1 deletion src/DGPoi/src/DGPoi.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ DG.Poi = DG.Handler.extend({
},

statics: {
metaURL: '__HIGHLIGHT_POI_SERVER__'
metaURL: '__POI_META_SERVER__'
},

initialize: function (map, options) { // (Object)
Expand Down

0 comments on commit 525cced

Please sign in to comment.