PageSourceSearch

https://www.georisques.gouv.fr/themes/custom/georisques/assets/dist/js/georisques_commun/cles-ign.js?tmm8z1

js georisques.gouv.fr collected 2026-10-09 16:46:43 UTC 6,361 bytes, 182 lines download raw bytes

1OpenLayers.Format.XLS.v1_2_0 = OpenLayers.Class(
2  OpenLayers.Format.XLS.v1, {
3    VERSION: "1.2",
4    schemaLocation: "http://www.opengis.net/xls http://schemas.opengis.net/ols/1.2/olsAll.xsd",
5    CLASS_NAME: "OpenLayers.Format.XLS.v1_2_0"
6  });
7OpenLayers.Format.XLS.v1_2 = OpenLayers.Format.XLS.v1_2_0;
8
9var OPENLS_API_KEYS = [
10  {
11    host: 'georisques.gouv.fr',
12    key: 'essentiels'
13  },
14  {
15    host: 'georisques-d9.brgm-rec.fr',
16    key: 'essentiels'
17  },
18  {
19    host: 'georisques.brgm-rec.fr',
20    key: 'essentiels'
21  },
22  {
23    host: '*',
24    key: 'essentiels'
25  }
26  //{host: '*', key: 'c561oh4ojioyevg3gxo17qsb' }
27  //{host: '*', key: 'kgco926a9mj4fcng4whjf5ac' }
28  //{host: '*', key: 'p6kbhs2thmtbn2fh3y4wetxx' }
29  //oxoe1c8zdqrwev8b7hd8en8w
30];
31
32var IGN_API_KEYS = [
33  {
34    host: 'georisques.gouv.fr',
35    key: 'essentiels'
36  },
37  {
38    host: 'georisques-d9.brgm-rec.fr',
39    key: 'essentiels'
40  },  
41  {
42    host: 'georisques.brgm-rec.fr',
43    key: 'essentiels'
44  },
45  {
46    host: '*',
47    key: 'essentiels'
48  }
49];
50
51var OPENLS_SERVICE_URL = 'https://wxs.ign.fr/{{apikey}}/geoportail/ols?output=json';
52
53var OPENLS_REQUEST_XLS = '<?xml version="1.0" encoding="UTF-8"?>' +
54  '<XLS' +
55  ' xmlns:xls="http://www.opengis.net/xls"' +
56  ' xmlns:gml="http://www.opengis.net/gml"' +
57  ' xmlns="http://www.opengis.net/xls"' +
58  ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' +
59  ' version="1.2"' +
60  ' xsi:schemaLocation="http://www.opengis.net/xls http://schemas.opengis.net/ols/1.2/olsAll.xsd">' +
61  '<RequestHeader/>' +
62  '<Request requestID="1" version="1.2" methodName="LocationUtilityService">' +
63  '<GeocodeRequest returnFreeForm="false">' +
64  '<Address countryCode="StreetAddress">' +
65  '<StreetAddress>' +
66  '<Street><![CDATA[{{street}}]]></Street>' +
67  '</StreetAddress>' +
68  '<Place type="Municipality"><![CDATA[{{city}}]]></Place>' +
69  '<PostalCode><![CDATA[{{zipcode}}]]></PostalCode>' +
70  '</Address>' +
71  '</GeocodeRequest>' +
72  '</Request>' +
73  '</XLS>';
74
75var OPEN_SERVICE_CADASTRE = 'https://wxs.ign.fr/{{apikey}}/geoportail/ols';
76
77var REQUEST_CADASTRE_XLS_ENCODED = 'xls=%3CXLS' +
78  '%20xmlns%3D%22http%3A//www.opengis.net/xls%22%20xmlns:gml%3D%22http%3A//www.opengis.net/gml%22' +
79  '%20xmlns%3Axsi%3D%22http%3A//www.w3.org/2001/XMLSchema-instance%22%20xsi%3AschemaLocation%3D%22http%3A//www.opengis.net/xls%22' +
80  '%20version%3D%221.2%22%3E' +
81  '%3CRequestHeader%20sessionID%3D%22%22/%3E' +
82  '%3CRequest%20methodName%3D%22{{methodName}}%22%20version%3D%221.2%22%20requestID%3D%22%22%20maximumResponses%3D%22100%22%3E' +
83  '%3CGeocodeRequest%3E' +
84  '%3CAddress%20countryCode%3D%22{{countryCode}}%22%3E' +
85  '%3CfreeFormAddress%3E%3C![CDATA[{{resultSearch}}]]%3E%3C/freeFormAddress%3E' +
86  '%3C/Address%3E' +
87  '%3C/GeocodeRequest%3E' +
88  '%3C/Request%3E' +
89  '%3C/XLS%3E' +
90  '&output=json' +
91  '&callback=OpenLayers.Protocol.Script.registry.regId{{idCadastre}}';
92
93var OPENLS_SERVICE_COMMUNE = 'https://wxs.ign.fr/{{apikey}}/geoportail/ols?output=json';
94
95var REQUEST_COMMUNE_XLS = '<?xml version="1.0" encoding="UTF-8"?>' +
96  '<XLS' +
97  ' xmlns:xls="http://www.opengis.net/xls"' +
98  ' xmlns:gml="http://www.opengis.net/gml"' +
99  ' xmlns="http://www.opengis.net/xls"' +
100  ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' +
101  ' version="1.2"' +
102  ' xsi:schemaLocation="http://www.opengis.net/xls http://schemas.opengis.net/ols/1.2/olsAll.xsd">' +
103  '<RequestHeader/>' +
104  '<Request requestID="1" version="1.2" methodName="LocationUtilityService">' +
105  '<GeocodeRequest returnFreeForm="false">' +
106  '<Address countryCode="StreetAddress">' +
107  '<StreetAddress/>' +
108  //		  '<freeFormAddress>{{codeInsee}}</freeFormAddress>' +
109  '<Place type="Municipality"><![CDATA[{{commune}}]]></Place>' +
110  //        '<Place type="Insee"><![CDATA[{{codeInsee}}]]></Place>' +
111  '<PostalCode/>' +
112  '</Address>' +
113  '</GeocodeRequest>' +
114  '</Request>' +
115  '</XLS>';
116
117var OPENLS_REQUEST_XLS_ADRESS = '<?xml version="1.0" encoding="UTF-8"?>' +
118  '<XLS' +
119  ' xmlns:xls="http://www.opengis.net/xls"' +
120  ' xmlns:gml="http://www.opengis.net/gml"' +
121  ' xmlns="http://www.opengis.net/xls"' +
122  ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' +
123  ' version="1.2"' +
124  ' xsi:schemaLocation="http://www.opengis.net/xls http://schemas.opengis.net/ols/1.2/olsAll.xsd">' +
125  '<RequestHeader/>' +
126  '<Request requestID="1" version="1.2" methodName="LocationUtilityService">' +
127  '<GeocodeRequest returnFreeForm="false">' +
128  '<Address countryCode="StreetAddress">' +
129  '<freeFormAddress><![CDATA[{{address}}]]></freeFormAddress>' +
130  '</Address>' +
131  '</GeocodeRequest>' +
132  '</Request>' +
133  '</XLS>';
134
135var OPENLS_REQUEST_XLS_INSEE = '<?xml version="1.0" encoding="UTF-8"?>' +
136  '<XLS' +
137  ' xmlns:xls="http://www.opengis.net/xls"' +
138  ' xmlns:gml="http://www.opengis.net/gml"' +
139  ' xmlns="http://www.opengis.net/xls"' +
140  ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' +
141  ' version="1.2"' +
142  ' xsi:schemaLocation="http://www.opengis.net/xls http://schemas.opengis.net/ols/1.2/olsAll.xsd">' +
143  '<RequestHeader/>' +
144  '<Request requestID="1" version="1.2" methodName="LocationUtilityService">' +
145  '<GeocodeRequest returnFreeForm="false">' +
146  '<Address countryCode="CadastralParcel">' +
147  '<freeFormAddress>{{codeInsee}}</freeFormAddress>' +
148  '</Address>' +
149  '</GeocodeRequest>' +
150  '</Request>' +
151  '</XLS>';
152
153var buildOpenLsParameter = function (street, zipcode, city) {
154  return OPENLS_REQUEST_XLS
155    .replace('{{street}}', street || '')
156    .replace('{{zipcode}}', zipcode || '')
157    .replace('{{city}}', city || '');
158};
159
160var buildRequestCadastre = function (resultSearch, dynamicID, countryCode, methodName) {
161  return REQUEST_CADASTRE_XLS_ENCODED
162    .replace('{{resultSearch}}', resultSearch)
163    .replace('{{idCadastre}}', dynamicID)
164    .replace('{{countryCode}}', countryCode)
165    .replace('{{methodName}}', methodName);
166};
167
168var buildRequestCommune = function (commune, codeInsee) {
169  return REQUEST_COMMUNE_XLS
170    .replace('{{commune}}', commune || '')
171    .replace('{{codeInsee}}', codeInsee || '');
172};
173
174var buildRequestInsee = function (codeInsee) {
175  return OPENLS_REQUEST_XLS_INSEE
176    .replace('{{codeInsee}}', codeInsee || '');
177};
178
179var buildRequestAdresse = function (address) {
180  return OPENLS_REQUEST_XLS_ADRESS
181    .replace('{{address}}', unescape(decodeURI(address)).replace(/\+/g, ' ') || '');
182};

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.