Commit 31d7ddce authored by MXSIG's avatar MXSIG
Browse files

Initial commit

parents
Pipeline #1651 failed with stages
CACHE MANIFEST
#NETWORK:
#/checking.cgi
CACHE:
http://gaiamapas.inegi.org.mx/mdmCache/*
http://gaiamapas1.inegi.org.mx/mdmCache/*
http://gaiamapas2.inegi.org.mx/mdmCache/*
http://gaiamapas3.inegi.org.mx/mdmCache/*
\ No newline at end of file
requirejs.config({
paths: {
mapConfig:'../config/mapConfig',
dataSource:'../config/dataSourceConfig',
uiConfig:'../config/uiConfig',
startupConfig:'../config/controlsConfig',
toolsConfig:'../config/toolsConfig',
tree:'../config/tree'
}
});
define(['mapConfig','uiConfig','dataSource','startupConfig','toolsConfig','tree'],function(mapConfig,uiConfig,dataSource,startupConfig,toolsConfig,tree){
var conf = {
map:mapConfig
}
if(typeof(MapConfig)!='undefined'){
mapConfig = $.extend(mapConfig, MapConfig);
}
if(typeof(sourcesConfig)!='undefined'){
dataSource = $.extend(dataSource, sourcesConfig);
}
if(typeof(controlConfig)!='undefined'){
startupConfig = $.extend(startupConfig, controlConfig);
}
if(typeof(mdm_toolsConfig)!='undefined'){
toolsConfig = $.extend(toolsConfig, mdm_toolsConfig);
}
if(typeof(mdm_tree)!='undefined'){
tree = $.extend(tree, mdm_tree);
}
return{mapConfig:mapConfig,ui:uiConfig,dataSource:dataSource,startupConfig:startupConfig,toolsConfig:toolsConfig,tree:tree}
});
\ No newline at end of file
// JavaScript Document
define(function(){
var ui = {
ui:{ denueTurista:false, //herramienta ¿Que hay aqui?
miniBaseMap:false,
startupTotorial:true,
layersBar:true, //barra de temas
autoOpenThemeBar:false,
toolBar:true, //barra de descarga compartir, imprimir y ayuda
tool_gps:true //boton GPS en control de vista
},
map:{
geolocation:true,
identify:{
enable:true,
createMarker:true,
custom:null,
fixedLayer:null
},
elevation:false,
onOver:{
showPolygon:false,
color:{
filled:"none",
size:2,
line:"#01FCEF"
},
changeDisplayOn:305.74811
},
level:true,
mousewheel:{
disable:false,
message:'No se activara por ahora'
}
},
system:{
activeCookie:true,
urlShareVars:true //complementa url con variables de vista actual para compartir
}
}
return ui;
})
define(function(){
var sources = {
proyAlias:'Mapa Digital de México',
proyName:'mdm6',
mapEvaluation:0,
servicesVersion:'mxsig', //determina si los servicios usaros son de INEGI o no, de no ser asi, debera ser un nombre sin espacios ni caracteres especiales
key:'mdm2fkXGf31xh-HRDdJFozU8HdM12ZmbQe8xkXDRxVkrho',
mainPath:'',
//Ejemplo de configuracion a busqueda solar Externa
search:{
url:'/mdmSearchEngine/busq-entidades/shard',
contentType : "application/json; charset=utf-8",
type: 'GET',
dataType: "jsonp",
jsonp:'json.wrf',
params:{
wt:'json',
ident:'true',
facet:'true',
'facet.field':'tipo',
'defType':'edismax',
qf:'busqueda'
}
},
layersSeaIde:{
url:'/mdmservices/fieldtypes',
contentType : "application/json; charset=utf-8",
type: 'POST',
dataType: "json"
},
exportList:{
url:'/mdmservices/export',
urlGet:'/mdmservices/export',
type: 'POST',
contentType : "application/json; charset=utf-8",
dataType: "json",
mainPath:false
},
saveStats:{
url:'/mdmservices/stats/layers',
type: 'POST',
contentType : "application/json; charset=utf-8",
dataType: "json",
},
share:{
contentType : "application/json; charset=utf-8",
url:'/mdmservices/share',
type: 'POST',
dataType: "json"
},
shareEmail:{
contentType : "application/json; charset=utf-8",
url:'/mdmservices/share/email',
type: 'POST',
dataType: "json"
},
identify:{
url:'/mdmservices/identify',
type: 'POST',
contentType : "application/json; charset=utf-8",
dataType: "json",
},
bufferLayer:{
url:'/mdmservices/totals',
contentType : "application/json; charset=utf-8",
type: 'POST',
dataType: "json"
},
identifyDetail:{
url:'/mdmservices/query',
type:'POST',
contentType : "application/json; charset=utf-8",
dataType: "json"
},
/*
crossSearch:{
url:'/TableAliasV601/busqueda',
contentType : "application/json; charset=utf-8",
type: 'POST',
dataType: "json",
mainPath:false
},
deepSearchTranslate:{
url:'TableAliasV60beta/busqueda',
type: 'POST',
dataType: "json",
contentType : "application/json; charset=utf-8",
stringify:true,
params:{
tabla: 'geolocator',
pagina: 1,
searchCriteria: '',
proyName: 'mdm6',
whereTipo: ''
},
mainPath:false
},
*/
denue:{
url:'http://10.1.30.101:9090/solr/denue/select',
field:'busqueda',
type: 'POST',
dataType: "jsonp",
jsonp:'json.wrf',
mainPath:false
},
kml:{
save:'/mdmexport/kml/download',
read:'/mdmexport/kml/upload'
},
gpx:{
save:{
save:'/mdmexport/gpx/download',
read:'/mdmexport/gpx/upload'
}
},
geometry:{
store:{
url:'/mdmservices/geometry',
type: 'POST',
dataType: "json",
contentType : "application/json; charset=utf-8"
},
addBuffer:{
url:'/mdmservices/buffer',
type:'POST',
dataType:'json',
contentType:'application/json; charset=utf-8'
},
restore:{
url:'/mdmservices/wkt/geometries',
type: 'GET',
dataType: "json",
contentType : "application/json; charset=utf-8"
}
},
detailTableSpecial:[
],
timeLine:'',
school:'',
leyendUrl:'/cgi-bin/mapserv?map=/opt/map/mdm60/mdm61leyendamxsig.map&Request=GetLegendGraphic&format=image/png&Version=1.1.1&Service=WMS&LAYER=',
synonyms:{
list:{
/*farmacia:['botica','drogeria'],
banco:['cajero'],
restaurant:['bar','merendero'],
hospital:['clinica'],
hotel:['motel','posada']*/
}
},
routing:{
movePoint:'routing/point/move'
},
cluster:{
moreLevels:[2.388657133483887,1.1943285667419434,0.5971642833709717,0.29858214168548586],
enableOn:{
layer:'cdenue14'
},
recordCard:{
url:'/mdmservices/denue/label',
type:'POST',
dataType:'json',
contentType:"application/json; charset=utf-8",
},
nodes:{
url:'/mdmservices/denue/scian',
type:'POST',
dataType:'json'
},
geometry:{
url:'/mdmservices/wkt/feature',
type:'POST',
dataType:'json'
}
},
displayGeometry:{
url:'/mdmservices/wkt/feature',
type:'POST',
dataType:'json',
contentType : "application/json; charset=utf-8"
},
//logging:'http://10.1.32.5/SISEC2013/jerseyservices/ServicioSesionJson',
georeferenceAddress:{
url:'http://gaia.inegi.org.mx/NLB/tunnel/map/reversegeocoding',
type: 'POST',//POST
dataType: "json",
contentType : "application/json; charset=utf-8"
},
mousePosition:{
elevation:{
url:'http://gaia.inegi.org.mx/NLB/tunnel/map/raster/elevation',
type:'POST',
contentType:'application/json; charset=utf-8',
dataType:'json'
}
},
files:{
download:'/mdmdownloadfile/download'
},
cenago:{
card:{
url:'/mdmservices/theme/cg/label',
type:'POST',
dataType:'json',
contentType : "application/json; charset=utf-8",
stringify:true
},
find:{
url:'/mdmservices/theme/cg/find',
type:'POST',
dataType:'json',
contentType : "application/json; charset=utf-8",
stringify:true
}
},
windy:{
getInfo:{
url:'/mdmservices/wind/infoWinds',
type:'GET',
dataType:'json',
contentType : "application/json; charset=utf-8",
stringify:false
},
display:{
url:'/mdmservices/wind/getWind',
type:'GET',
dataType:'json',
contentType : "application/json; charset=utf-8",
stringify:false
}
}
};
return sources;
});
\ No newline at end of file
requirejs.config({
paths: {
dataSource:'../config/dataSourceConfig'
}
});
define(['dataSource'],function(dataSource){
var params = function(data,type){
var jsonData;
switch (type){
case 'search':
var jsonData = $.extend(true,{},dataSource.deepSearchTranslate);
jsonData.params.searchCriteria = data.q;
break;
case 'category':
var jsonData = $.extend(true,{},dataSource.deepSearchTranslate);
jsonData.params.searchCriteria = data.q;
jsonData.params.whereTipo = data.fq[1].split(':')[1].replace(/"/g, '');
break;
}
return jsonData;
};
var results = function(data,type){
var response = {};
switch (type){
case 'search': case 'category':
var dList = data.data.value;
var total = (dList == null)?0:data.data.totalFields;
var tList = data.data.types;
var rList = [];
var hList = {};
//extrae los resultados
for (var x in dList){
var fields = dList[x].fields.fields;
var record = {};
for (var y in fields){
var field = fields[y];
record[field.aliasName.toLowerCase()] = field.value;
if(field.aliasName.toLowerCase() == 'busqueda'){
}
}
var hl_record = {};
hList[record.gid] = {'busqueda':record.busqueda};
rList.push(record);
}
var tipoList = [];
for (var x in tList){
tipoList.push(tList[x]);
tipoList.push(1);
}
var response = {
"responseHeader":{
"status":0,
"QTime":0
},
"response":{
"numFound":total,
"start":0,
"docs":rList
},
"facet_counts":{
"facet_queries":{
},
"facet_fields":{
"tipo":tipoList
},
"facet_dates":{
},
"facet_ranges":{
}
},
"highlighting":hList
}
break;
}
return response;
};
var search = {
params:function(ver,obj){
if(ver && ver == '6.0'){
obj.params = {
searchCriteria:obj.params.q,
pagina:1,
tabla:'geolocator'
}
}
return obj;
},
result:function(ver,obj){
if(ver && ver == '6.0'){
var r = {
categories:{},
results:[]
}
var cat = obj.types;
for(var x in cat){
var text = cat[x];
r.categories[text.split('|')[1]] = text.split('|')[0];
}
var fields = obj.value;
for(var f in fields){
var items = fields[f].fields.fields;
var record = {};
for(var x in items){
record[items[x].aliasName.toLowerCase()] = items[x].value;
}
record.gid = record.id;
r.results.push(record);
}
obj = r;
}
return obj;
},
}
return {params:params, results:results,search:search};
})
\ No newline at end of file
define(function(){
var locations = {
"Aguascalientes":"01",
"Baja California":"02",
"Baja California Sur":"03",
"Campeche":"04",
"Coahuila de Zaragoza":"05",
"Colima":"06",
"Chiapas":"07",
"Chihuahua":"08",
"Ciudad de México":"09",
"Durango":"10",
"Guanajuato":"11",
"Guerrero":"12",
"Hidalgo":"13",
"Jalisco":"14",
"México":"15",
"Michoacán de Ocampo":"16",
"Morelos":"17",
"Nayarit":"18",
"Nuevo León":"19",
"Oaxaca":"20",
"Puebla":"21",
"Querétaro":"22",
"Quintana Roo":"23",
"San Luis Potosí":"24",
"Sinaloa":"25",
"Sonora":"26",
"Tabasco":"27",
"Tamaulipas":"28",
"Tlaxcala":"29",
"Veracruz de Ignacio de la Llave":"30",
"Yucatán":"31",
"Zacatecas":"32",
}
var onError = {
city:"Aguascalientes",
cityCode:"01",
lat:2496332.161744891,
lon:-11385824.310030498,
region:"Aguascalientes"
}
return {locations:locations,onError:onError};
})
\ No newline at end of file
define(function(){
var sprite = {
//base router from sprite
zoologico:'zoologico',
hospital:'hospital',
iglesia:'iglesia',
escuela:'escuela',
ccomercial:'ccomercial',
departamental:'departamental',
autobus:'autobus',
historico:'historico',
hotel:'hotel',
museo:'museo',
restaurant:'restaurant',
gasolinera:'gasolinera',
banco:'banco',
aeropuerto:'aeropuerto',
edo:'edo',
mun:'mun',
loc:'loc',
locurb:'loc-urb',
ageb:'ageb',
col:'col',
mzn:'mzn',
calle:'calle',
dom:'dom',
dom2:'dom2',
hidro:'hidro',
geodesia:'geodesia',
oro:'oro',
//router class
entidadfederativa:'edo',
localidad:'loc',
localidadurbana:'loc',
localidadrural:'loc-urb',
municipio:'mun',
rasgoshidrograficos:'hidro',
rasgosorograficos:'oro',
domicilio:'dom',
calles:'calle',
colonia:'col',
manzana:'mzn',
marcasgeodesicas:'geodesia',
restaurante:'restaurant',
tiendadepartamental:'departamental',
sitiohistorico:'historico',
centraldeautobuses:'autobus',
supermercado:'ccomercial',
layer:'layer',
}
var getIcon = function(text){
var icon = '';
var list = sprite;
if (!(list[text] === undefined)){
icon = 'mainSprite mainSprite-icon-'+list[text];
}else{
icon = 'mainSprite mainSprite-icon-loc-urb';
}
return icon;
}
return {list:sprite,getIcon:getIcon};
})
\ No newline at end of file
// JavaScript Document
window.layerWidgets.cwidgetbase.config = {
settings:{
project:'mxsig',
sourceDataInfo:'Fuente de los datos',
mainDoc:'config/layerWidgets/cwidgetbase/docs/mainDoc.pdf', //documento de descarga ubicado en los botones principales
bootDialog:'config/layerWidgets/cwidgetbase/docs/init.html', //documento html que funge como mensaje de información
bootDialogTitle:'Información de ejemplo', //titulo de la ventana emergente con el mensaje de información
cardIndicatorOrder:[ //orden de impresion en tabulado de resultados
{id:'label',label:'Indicador'},
{id:'value',label:'Valor'}
],
transparency:100, //transparencia por defecto del tema pintado en mapa
colorRamps:[
{id:0,name:'Escarlata',colors:['#FFE0E0','#EBA59B','#CF705F','#B04130','#910A0A']},
{id:1,name:'Verdes',colors:['#D8F2ED','#9FC4BE','#6B9993','#3F736D','#144F4A']},
{id:2,name:'Naranja',colors:['#F5F500','#F5B800','#F57A00','#F53D00','#F50000']},
{id:3,name:'Azules',colors:['#B6EDF0','#74B4E8','#1F83E0','#1D44B8','#090991']},
{id:4,name:'Amarillos',colors:['#FFF28C','#DCBB6A','#BE8447','#9F4C25','#801502']},
{id:5,name:'Grises',colors:['#BDBFBF','#8B8C8C','#656666','#4C4C4C','#292929']}
],
numStrats:5,
methods:[
{name:'cuantiles',title:'Cuantiles'},
{name:'nei',title:'N.E.I'},
{name:'d2r',title:'Dalenius'},
{name:'jenks',title:'R. Naturales'}
],
minStrats:1,
maxStrats:5,
//Valores fijos -------------------------------------------------------------------
geoLevels:[],// Carga dinamica de valores desde servicio de action
exportTypes:['xls','csv'],
//----------------------------------------------------------------------------------
},
startingData:{
varActive:{
descripcion:"Masculino",
id:3,
subcat:false,
theme:true,
variable:"p4_1"
},
colors:{id:0,name:'Escarlata',colors:['#FFE0E0','#EBA59B','#CF705F','#B04130','#910A0A']},
method:'jenks',
strats:5,
//Valores Fijos----------------------------------------------