Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 | 1x 21x 21x 21x 21x 4x 1x 2x 2x 2x 3x 2x 1x 1x 1x 1x | // cette classe contient les URLs par defaut des services. // DefaultUrlService.Alti.url(key)[elevation-json] // DefaultUrlService.Alti.url(key)[elevation-xml] // DefaultUrlService.Alti.url(key)[profil-json] // DefaultUrlService.Alti.url(key)[profil-xml] // DefaultUrlService.ProcessIsoCurve.url(key) // DefaultUrlService.AutoComplete.url(key) // DefaultUrlService.ReverseGeocode.url(key) // DefaultUrlService.Geocode.url(key) // DefaultUrlService.Route.url(key) // Example : // // DefaultUrlService.Alti.url('alti')[elevation-json] // output {String} -> http://wxs.ign.fr/calcul/alti/rest/elevation.json // // DefaultUrlService.Alti.url('calcul') // output {Object|String} // -> http://wxs.ign.fr/calcul/alti/rest/elevation.json // -> http://wxs.ign.fr/calcul/alti/rest/elevation.xml // -> http://wxs.ign.fr/calcul/alti/rest/elevationLine.json // -> http://wxs.ign.fr/calcul/alti/rest/elevationLine.xml // // ssl by default. // // Force to not do ssl : // DefaultUrlService.ssl = false; // // DefaultUrlService.AutoComplete.url('calcul') // output {Object|String} // -> https://wxs.ign.fr/calcul/ols/apis/completion /** * Default Geoportal web services URLs access. * * @namespace * @alias Gp.Services.DefaultUrl */ var DefaultUrlService = { /** if set true, require the use of https protocol */ ssl : true, /** * base new-url of geoplateforme services (ssl protocol management) * @param {String} path - path * @returns {String} url */ newUrl : function (path) { var NEW_GPF_HOSTNAME = "data.geopf.fr"; // comportement par défaut => https // sinon, il est fixé par l'option 'ssl' (false => http) var _protocol; Iif (DefaultUrlService.ssl === false) { _protocol = "http://"; } else { _protocol = "https://"; } return _protocol + NEW_GPF_HOSTNAME + path; }, /** * Elevation web service access * * @member {Object} * @property {Function} url (key) - Returns elevation service default urls with or without geoportal access key given as a parameter. The result is a javascript object with different urls given used protocols ("elevation-json", "elevation-xml", "profil-json" or "profil-xml"). */ Alti : { new_key : { // rest "elevation-json" : "/altimetrie/1.0/calcul/alti/rest/elevation.json", "elevation-xml" : "/altimetrie/1.0/calcul/alti/rest/elevation.xml", "profil-json" : "/altimetrie/1.0/calcul/alti/rest/elevationLine.json", "profil-xml" : "/altimetrie/1.0/calcul/alti/rest/elevationLine.xml" }, /** * newurl from geoplateforme service * @param {String} key - key * @returns {String} url */ newUrl : function () { return { // rest "elevation-json" : DefaultUrlService.newUrl(this.new_key["elevation-json"]), "elevation-xml" : DefaultUrlService.newUrl(this.new_key["elevation-xml"]), "profil-json" : DefaultUrlService.newUrl(this.new_key["profil-json"]), "profil-xml" : DefaultUrlService.newUrl(this.new_key["profil-xml"]) }; } }, /** * IsoCurve web service access * * @member {Object} * @property {Function} url (key) - Returns isocurve service default urls with or without geoportal access key given as a parameter. The result is a javascript object with different urls given used protocols ("iso-json" or "iso-xml"). */ ProcessIsoCurve : { new_key : "/navigation/isochrone", /** * url from geoplateforme service * @returns {String} url */ newUrl : function () { return DefaultUrlService.newUrl(this.new_key); } }, /** * Config web service access * * @member {Object} * @property {Function} url (key) - Returns config service default urls with or without geoportal access key given as a parameter. */ Config : { _key : "https://raw.githubusercontent.com/IGNF/geoportal-configuration/new-url/dist/", /** * url * @param {String} key - key * @returns {String} url */ url : function (key) { // key must be an array of one or several keys Iif (!Array.isArray(key)) { key = key.split(","); } // not homogeneous with others geoportal services URLs var url = []; for (var i = 0; i < key.length; i++) { url[i] = this._key + key[i] + "Config.json"; } return url; } }, /** * Autocompletion web service access * * @member {Object} * @property {Function} url (key) - Returns autocomplete service default urls with or without geoportal access key given as a parameter. The result is a String. */ AutoComplete : { new_key : "/geocodage/completion", /** * url from geoplateforme service * @returns {String} url */ newUrl : function () { return DefaultUrlService.newUrl(this.new_key); } }, /** * Reverse geocoding web service access * * @member {Object} * @property {Function} url (key) - Returns reverse geocoding service default urls with or without geoportal access key given as a parameter. The result is a String. */ ReverseGeocode : { new_key : "/geocodage/reverse", /** * url from geoplateforme service * @returns {String} url */ newUrl : function () { return DefaultUrlService.newUrl(this.new_key); } }, /** * Geocoding web service access * * @member {Object} * @property {Function} url (key) - Returns geocoding service default urls with or without geoportal access key given as a parameter. The result is a String. */ Geocode : { new_key : "/geocodage/search", /** * url from geoplateforme service * @returns {String} url */ newUrl : function () { return DefaultUrlService.newUrl(this.new_key); } }, /** * Routing web service access * * @member {Object} * @property {Function} url (key) - Returns routing service default urls with or without geoportal access key given as a parameter. The result is a javascript object with different urls given used protocols. */ Route : { new_key : "/navigation/itineraire", /** * url from geoplateforme service * @returns {String} url */ newUrl : function () { return DefaultUrlService.newUrl(this.new_key); } } }; export default DefaultUrlService; |