apiUrl = 'apieatlas.mos.ru/js/1.5.4';
window.djConfig = {
baseUrl: window.location.protocol + '//' + apiUrl + '/vendor/arcgis_js_v32_api/arcgis_js_api/library/3.2/jsapicompact/js/',
parseOnLoad: true,
isDebug: false,
has: {
'dojo-firebug': false,
'dojo-debug-messages': false
},
async: false,
packages: [
{name: 'dojo', location: 'dojo/dojo'},
{name: 'dojox', location: 'dojo/dojox'},
{name: 'dijit', location: 'dojo/dijit'},
{name: 'esri', location: 'esri'},
{name: 'gcapi', location: '//' + apiUrl + '/gcapi'},
{name: 'extras', location: '//' + apiUrl + '/vendor/extras'}
]
};
window.gcapi = {
UHost: window.location.host,
ApiServer: window.location.protocol + "//" + apiUrl + "/",
UVersion: "1.5.4",
startscripts: {},
Paths: {
protocol: window.location.protocol,
copy: 0,
identify: window.location.protocol + "//apieatlas.mos.ru/arcgis/rest/services/Basemaps/MoscowBnd/MapServer/identify",
traffic_path: window.location.protocol + "//77.246.234.123:8888/arcgis/rest/services/showjams/MapServer",
jam_path: window.location.protocol + "//",
satellite_path: window.location.protocol + "//apieatlas.mos.ru/arcgis/rest/services/Basemaps/egip_sat/MapServer",
route_path_p: window.location.protocol + "//apieatlas.mos.ru/arcgis/rest/services/Basemaps/trackline/NAServer/Route",
route_path: window.location.protocol + "//apieatlas.mos.ru/arcgis/rest/services/Basemaps/trackline/NAServer/Route",
geometry_path: window.location.protocol + "//apieatlas.mos.ru/arcgis/rest/services/Utilities/Geometry/GeometryServer",
map_hybrid_path: window.location.protocol + "//apieatlas.mos.ru/arcgis/rest/services/Basemaps/hybrid/MapServer",
map_path: window.location.protocol + "//apieatlas.mos.ru/arcgis/rest/services/Basemaps/egko_gc_graphics_rus/MapServer",
locator_path: window.location.protocol + "//apieatlas.mos.ru/arcgis/rest/services/Basemaps/locator/GeocodeServer",
poly_simplify: window.location.protocol + "//localhost/arcgis/rest/services/Utilities/Geometry/GeometryServer/simplify",
poly_areasAndLengths: window.location.protocol + "//localhost/arcgis/rest/services/Utilities/Geometry/GeometryServer/areasAndLengths",
poly_labelPoints: window.location.protocol + "//localhost/arcgis/rest/services/Utilities/Geometry/GeometryServer/labelPoints",
poi: window.location.protocol + "//77.246.234.123:8890/scripts_p/TestISAPI2.dll/wsdl/IPOISearch",
reverseGeocode: window.location.protocol + "//localhost/arcgis/rest/services/Basemaps/locator/GeocodeServer/reverseGeocode",
distance: window.location.protocol + "//apieatlas.mos.ru/arcgis/rest/services/Utilities/Geometry/GeometryServer/distance",
tilecheck: window.location.protocol + "//localhost/arcgis/rest/services/basemap/MapServer/tile",
map_path_graphics: window.location.protocol + "//apieatlas.mos.ru/arcgis/rest/services/Basemaps/egko_gc_graphics/MapServer",
map_anno_ru: window.location.protocol + "//apieatlas.mos.ru/arcgis/rest/services/Basemaps/egko_gc_anno_rus/MapServer",
map_anno_en: window.location.protocol + "//apieatlas.mos.ru/arcgis/rest/services/Basemaps/egko_gc_anno_rus_eng/MapServer",
map_hybrid_path_en: window.location.protocol + "//apieatlas.mos.ru/arcgis/rest/services/Basemaps/egko_gc_hyb_rus_eng/MapServer",
satellite_type: "tile",
satellite_copy: "Условия использования",
map_path_copy: "Условия использования",
map_hybrid_path_copy: "Условия использования",
satellite_copy_color: "#FFFFFF",
map_copy_color: "#000000",
hybrid_copy_color: "#FFFFFF",
egip_service: window.location.protocol + "//apieatlas.mos.ru/arcgis/rest/services/Basemaps/egipdata/MapServer",
egip_service_Granici_adm_okrugov_EDS_layer: "Granici_adm_okrugov_EDS",
egip_service_Granici_municip_obraz_EDS_layer: "Granici_municip_obraz_EDS",
egip_service_Granici_rayonov_EDS_layer: "Granici_rayonov_EDS",
ObjectCard: "http://ehpd.mos.ru/services/publish/getObjectCard",
EACatalog: "http://ehpd.mos.ru/services/publish/getCatalog?allLayers=false&language=ru",
EAClusters: "http://ehpd.mos.ru/services/publish/getClusters",
EABreadCrumbs: "http://ehpd.mos.ru/services/publish/getBreadCrumbs?language=ru",
EAClusterImage: "http://api-dev.eatlas.mos.ru/server/image/cluster/",
EAPOISerach: "http://ehpd.mos.ru/services/publish/search_ru",
EAPinImage: 'http://api-dev.eatlas.mos.ru/server/image/poi'
}
};
var jsjs = document.createElement("script");
jsjs.src = window.location.protocol + '//' + apiUrl + '/js.js';
jsjs.type = "text/javascript";
jsjs.onload = function () {
console.log(jsjs.src, " loaded!");
if (gcapi.startscripts === undefined) {
gcapi.startscripts = {};
}
if (gcapi.startscripts.jsjs === undefined) {
gcapi.startscripts.jsjs = {};
}
gcapi.startscripts.jsjs.loaded = true;
};
jsjs.onerror = function () {
console.log("Error: " + this.src);
};
var csscss = document.createElement("link");
csscss.href = window.location.protocol + '//' + apiUrl + '/css.css';
csscss.rel = "stylesheet";
csscss.type = "text/css";
csscss.onload = function () {
console.log(csscss.href, "loaded!");
if (gcapi.startscripts === undefined) {
gcapi.startscripts = {};
}
if (gcapi.startscripts.csscss === undefined) {
gcapi.startscripts.csscss = {};
}
gcapi.startscripts.csscss.loaded = true;
};
csscss.onerror = function () {
console.log("Error: " + this.src);
};
document.getElementsByTagName("head")[0].appendChild(jsjs);
document.getElementsByTagName("head")[0].appendChild(csscss);
!gcapi.uFuncs && (gcapi.uFuncs = {});
var waiting = setInterval(function () {
if (gcapi.ready && typeof(esri) !== 'undefined' && typeof(_gcapi) === 'function') {
var userStartFunction;
if(typeof gcapi.ready === 'string') {
console.warn('Используемый вариант инициализации с использованием передачи строки в свойство gcapi.ready является устаревшим!\n' +
'Передайте в gcapi.ready функцию!');
userStartFunction = new Function('', gcapi.ready + '()');
} else {
userStartFunction = gcapi.ready;
}
clearInterval(waiting);
window.gcapi = new _gcapi();
userStartFunction();
window.gcapi.StartFunction();
}
}, 100);