Skip to content

opalesurfcasting/api-geoportail-v2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

api-geoportail-v2

Canonicalize Géoportail API V2.12 using jsDelivr Github CDN and mod_pagespeed, or, included as a simple direct url.

Using Apache mod_pagespeed - In pagespeed.conf:

This will enable canonicalization for GeoportalExtended.js (API geoportail V2.1.2) using jsDelivr Github CDN - The parameter below will enable detection from this librarie size and checksum :

ModPagespeedEnableFilters canonicalize_javascript_libraries

Adding this :

 ModPagespeedLibrary 2501255 4rkPXu2ba2rm4IzplzhHP \
    //cdn.jsdelivr.net/gh/opalesurfcasting/[email protected]/GeoportalExtended.min.js

will enable canonicalization for GeoportalExtended.js, also based on file size 2501255 and checksum. This is needed as this file is not in default canonicalized libraries list.

Find the size and checksum :

pagespeed_js_minify --print_size_and_hash GeoportalExtended.js - Find the size and checksum

Including direct urls :

minified : https://cdn.jsdelivr.net/gh/opalesurfcasting/[email protected]/GeoportalExtended.min.js

Update since last IGN release (V2.1.2)

V2.1.2.001

fix target='_blank' without rel='noopener' in GeoportalExtended.js https://mathiasbynens.github.io/rel-noopener/

V2.1.2.002

fix CGU url

V2.1.2.003

use rel="preload" as="style" for css in GeoportalExtended.js https://developer.mozilla.org/en-US/docs/Web/HTML/Preloading_content https://developers.google.com/web/tools/lighthouse/audits/preload

Notes :

When canonicalized, libraries will not be combined or minifyed by mod_pagespeed, but it can be done through jsdlivr. It's up to you to check what is the best.

https://www.developpez.net/forums/d1784282/applications/sig-systeme-d-information-geographique/ign-api-geoportail/geoportalextended-js-github-ign-jsdelivr-net/

IGN (Géoportail) Sources repository : https://depot.ign.fr/geoportail/api/develop/tech-docs-js/fr/developpeur/download.html

https://geoservices.ign.fr/

Informations de licence

https://github.com/opalesurfcasting/api-geoportail-v2/blob/master/LICENSE

l'API Géoportail V3 :