1(function($) { 2 var app = $.sammy(function() { 3 // config 4 this.debug = false; 5 this.disable_push_state = true; 6 7 this.url = ''; 8 9 this.get('#/carte', 10 function () { 11 $.getJSON("/themes/custom/georisques/assets/dist/js/georisques_commun/cartes-properties.json", function (json) { 12 var bbox = json.DEFAUT.bbox; 13 app.loadMap($('#carte-th').attr('src') || json.DEFAUT.serviceMap, [bbox.minX, bbox.minY, bbox.maxX, bbox.maxY], bbox.srid); 14 }); 15 } 16 ); 17 18 19 this.get('#/show/:url/:bbox', 20 function() { 21 app.loadMap(this.params.url, this.params.bbox, null); 22 } 23 ); 24 25 26 this.get('#/show/:url/:zoom/lat/:lat/lon/:lon', 27 function() { 28 app.loadMapLatLon(this.params.url, this.params.zoom, this.params.lat, this.params.lon); 29 } 30 ); 31 32 33 this.get('#/com/:com', 34 function () { 35 this.load(app.wsUrl + '/communes/' + this.params.com + '/bbox.json') 36 .then(function (bbox) { 37 app.loadMap(null, [bbox.minX, bbox.minY, bbox.maxX, bbox.maxY], ''); 38 }); 39 } 40 ); 41 42 43 this.get('#/dpt/:dpt', 44 function () { 45 this.load(app.wsUrl + '/departements/' + this.params.dpt + '/bbox.json') 46 .then(function (bbox) { 47 app.loadMap(null, [bbox.minX, bbox.minY, bbox.maxX, bbox.maxY], ''); 48 }); 49 } 50 ); 51 52 53 this.get('#/reg/:reg', 54 function () { 55 this.load(app.wsUrl + '/regions/' + this.params.reg + '/bbox.json') 56 .then(function (bbox) { 57 app.loadMap(null, [bbox.minX, bbox.minY, bbox.maxX, bbox.maxY], ''); 58 }); 59 } 60 ); 61 62 63 this.get('#/admin/com/:com', 64 function () { 65 this.load(app.wsUrl + '/admin/communes/' + this.params.com + '/bbox.json') 66 .then(function (bbox) { 67 app.loadMap(null, [bbox.minX, bbox.minY, bbox.maxX, bbox.maxY], ''); 68 }); 69 } 70 ); 71 72 73 this.get('#/admin/dpt/:dpt', 74 function () { 75 this.load(app.wsUrl + '/admin/departements/' + this.params.dpt + '/bbox.json') 76 .then(function (bbox) { 77 app.loadMap(null, [bbox.minX, bbox.minY, bbox.maxX, bbox.maxY], ''); 78 }); 79 } 80 ); 81 82 83 this.get('#/admin/reg/:reg', 84 function () { 85 this.load(app.wsUrl + '/admin/regions/' + this.params.reg + '/bbox.json') 86 .then(function (bbox) { 87 app.loadMap(null, [bbox.minX, bbox.minY, bbox.maxX, bbox.maxY], ''); 88 }); 89 } 90 ); 91 92 93 this.get('#/admin/fxx', 94 function () { 95 $.getJSON("/themes/custom/georisques/assets/dist/js/georisques_commun/cartes-properties.json", function (json) { 96 var bbox = json.DEFAUT.bbox; 97 app.loadMap($('#carte-th').attr('src') || json.DEFAUT.serviceMap, [bbox.minX, bbox.minY, bbox.maxX, bbox.maxY], bbox.srid); 98 }); 99 } 100 ); 101 102 this.get('#/', function() { 103 // Do nothing, just avoid 404 104 }); 105 }); 106 107 var changeZIndexMenu = function(id) { 108 if ($(id).css("z-index") && $(id).css("z-index") !== 'auto') { 109 $('.menu').css("z-index", 1); 110 } else { 111 $('.menu').css("z-index", 5); 112 } 113 } 114 115 $(function() { 116 if($('.interactive-map').length){ 117 $('#main').focus(); 118 app.run('#/'); 119 } 120 }); 121})(jQuery);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.