{"id":512,"date":"2019-04-08T10:54:35","date_gmt":"2019-04-08T08:54:35","guid":{"rendered":"https:\/\/geekcommunicant.com\/blog\/?p=512"},"modified":"2019-05-02T14:50:20","modified_gmt":"2019-05-02T12:50:20","slug":"remake-carte-openlayers","status":"publish","type":"post","link":"https:\/\/geekcommunicant.com\/blog\/2019\/04\/08\/remake-carte-openlayers\/","title":{"rendered":"Remake de ma carte interactive avec OpenLayers"},"content":{"rendered":"\n<p>Il n&rsquo;y a pas tr\u00e8s longtemps, en faisant la maintenance de mon site (oui, m\u00eame si le contenu n&rsquo;\u00e9volue quasiment pas, le site n&rsquo;est pas \u00e0 l&rsquo;abandon) je suis retomb\u00e9 sur la <a title=\"[D\u00e9mo] Une carte interactive en jQuery\" href=\"https:\/\/geekcommunicant.com\/demos\/map.html\" target=\"_blank\" rel=\"noopener noreferrer\">carte interactive<\/a> que j&rsquo;avais r\u00e9alis\u00e9es plusieurs ann\u00e9es auparavant.<\/p>\n\n\n\n<p>Cette carte reposait sur l&rsquo;utilisation d&rsquo;une image comme fond de carte, et d&rsquo;une <a title=\"HTML map tag\" href=\"https:\/\/www.w3schools.com\/tags\/tag_map.asp\" target=\"_blank\" rel=\"noopener noreferrer\">map HTML<\/a> plus un script jQuery.<\/p>\n\n\n\n<p>J&rsquo;avais r\u00e9sum\u00e9 le processus de cr\u00e9ation dans deux articles :<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li><a title=\"Cr\u00e9ation du fond et du mappage HTML\" href=\"https:\/\/geekcommunicant.com\/blog\/2012\/09\/29\/comment-realiser-une-carte-interactive-1-sur-2\/\" target=\"_blank\" rel=\"noopener noreferrer\">Cr\u00e9ation de la carte et du mappage<\/a><\/li><li><a title=\"Interactivit\u00e9 et jQuery\" href=\"https:\/\/geekcommunicant.com\/blog\/2012\/09\/30\/comment-realiser-une-carte-interactive-2-sur-2\/\" target=\"_blank\" rel=\"noopener noreferrer\">Ajout interactivit\u00e9 avec jQuery<\/a><\/li><\/ol>\n\n\n\n<p>L&rsquo;inconv\u00e9nient de cette solution est quelle ne fonctionne pas sur Chrome. Et Chrome \u00e9tant le navigateur avec la plus grosse part de march\u00e9 cela est probl\u00e9matique.<\/p>\n\n\n\n<p>Derni\u00e8rement, lors de ma mission chez Orange, j&rsquo;ai \u00e9t\u00e9 amen\u00e9 \u00e0 travailler sur une partie de cartographie. Pour des raisons de confidentialit\u00e9, il avait \u00e9t\u00e9 d\u00e9cid\u00e9 de ne pas utiliser de solution commerciale (celle de big G dans ce cas), mais une solution open-source.<\/p>\n\n\n\n<p>Le choix final c&rsquo;est arr\u00eat\u00e9 sur la librairie <a title=\"OpenLayers\" href=\"https:\/\/openlayers.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">OpenLayers<\/a>, avec un fond <a title=\"OpenStreetMap\" href=\"https:\/\/www.openstreetmap.org\" target=\"_blank\" rel=\"noopener noreferrer\">OpenStreetMap<\/a>.<\/p>\n\n\n\n<p>Or cette librairie (compatible avec tous les navigateurs modernes) permet l&rsquo;utilisation d&rsquo;une image statique comme fond de carte (voir cet <a title=\"\" href=\"https:\/\/openlayers.org\/en\/latest\/examples\/static-image.html\" target=\"_blank\" rel=\"noopener noreferrer\">exemple<\/a>). C&rsquo;est donc pourquoi j&rsquo;ai d\u00e9cid\u00e9 de refaire une carte interactive \u00e0 l&rsquo;aide de cette librairie.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Cr\u00e9ation de la carte<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Pr\u00e9paratifs<\/h3>\n\n\n\n<p>Comme avec toute librairie, il faut d&rsquo;abord l&rsquo;int\u00e9grer \u00e0 votre page (via un CDN ou en local), ainsi que sa feuille de style.<\/p>\n\n\n\n<p>Ensuite, il faut cr\u00e9er dans le corps de la page une div qui sera utilis\u00e9e par OpenLayers pour cr\u00e9er la carte. De plus, cette div doit \u00eatre pr\u00e9alablement dimensionn\u00e9e, si vous ne souhaitez pas qu&rsquo;elle occupe toute la largeur disponible.<\/p>\n\n\n\n<p>Le script de cr\u00e9ation de la carte, quant \u00e0 lui, doit \u00eatre plac\u00e9 \u00e0 la fin du body de la page.<\/p>\n\n\n\n<p>Bon, tout est pr\u00e8s ? Il est temps de passer \u00e0 la cr\u00e9ation de notre carte.<br><\/p>\n\n\n\n<!--more-->\n\n\n\n<h3 class=\"wp-block-heading\">Utilisation d&rsquo;une image comme fond de carte<\/h3>\n\n\n\n<p>OpenLayers \u00e9tant une librairie de cartographie, il lui faut une projection. Comme ici on utilise une image comme fond de carte, il faut cr\u00e9er une projection fictive.<\/p>\n\n\n\n<p>Avec OpenLayers, cela ce fait comme \u00e7a :<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nvar extent = &#x5B;0,0,432,463]; \/\/ coordonn\u00e9es des coins sup\u00e9rieur gauche et inf\u00e9rieur droit\n\nvar projection = new ol.proj.Projection({\n    code: &#039;custom&#039;,\n    units: &#039;pixels&#039;, \/\/ unit\u00e9 utilis\u00e9e par la projection\n    extent: extent\n});\n<\/pre><\/div>\n\n\n<p>Il est ensuite temps d&rsquo;initialiser la carte :<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nvar map = new ol.Map({\n    layers: &#x5B; \/\/ tableau contenant les couches de carte\n        new ol.layer.Image({ \/\/ couche de type image\n            source: new ol.source.ImageStatic({ \/\/ source de type image statique\n                url: &#039;lien_vers_votre_image&#039;,\n                projection: projection,\n                imageExtent: extent\n            })\n        })\n    ],\n    target: &#039;map&#039;, \/\/ id de la div destin\u00e9e \u00e0 contenir la carte\n    view: new ol.View({\n        projection: projection,\n        center: ol.extent.getCenter(extent), \/\/ on centre la carte au milieu de l&#039;image\n        resolution: 1 \/\/ zoom \u00e0 l&#039;\u00e9chelle 1\n    })\n}); \n<\/pre><\/div>\n\n\n<p>On obtient alors le r\u00e9sultat suivant.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"441\" height=\"468\" src=\"https:\/\/geekcommunicant.com\/blog\/wp-content\/uploads\/carte-openlayers-base.png\" alt=\"Carte OpenLayers de base\" class=\"wp-image-527\" srcset=\"https:\/\/geekcommunicant.com\/blog\/wp-content\/uploads\/carte-openlayers-base.png 441w, https:\/\/geekcommunicant.com\/blog\/wp-content\/uploads\/carte-openlayers-base-283x300.png 283w\" sizes=\"auto, (max-width: 441px) 100vw, 441px\" \/><\/figure><\/div>\n\n\n\n<p>Le r\u00e9sultat est bien ce \u00e0 quoi on s&rsquo;attend.<\/p>\n\n\n\n<!--nextpage-->\n\n\n\n<h3 class=\"wp-block-heading\">D\u00e9sactivation des contr\u00f4les et interactions<\/h3>\n\n\n\n<p>Mais, avec ce code, les interactions (zoom avec la molette de la souris, d\u00e9placement de la carte au clic de la souris) et les contr\u00f4les (boutons + et -) basiques d&rsquo;une carte restent actifs.<\/p>\n\n\n\n<p>Pour d\u00e9sactiver ces contr\u00f4les et interactions, on va pr\u00e9ciser les attributs \u00ab\u00a0interactions\u00a0\u00bb et \u00ab\u00a0controls\u00a0\u00bb de notre map :<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nvar map = new ol.Map({\n    layers: &#x5B;\n        new ol.layer.Image({\n            source: new ol.source.ImageStatic({\n                url: &#039;lien_vers_votre_image&#039;,\n                projection: projection,\n                imageExtent: extent\n            })\n        })\n    ],\n    target: &#039;map&#039;,\n    view: new ol.View({\n        projection: projection,\n        center: ol.extent.getCenter(extent),\n        resolution: 1\n    }),\n    interactions: ol.interaction.defaults({\n        altShiftDragRotate: false, \/\/ rotation de la carte\n        doubleClickZoom: false, \/\/ zoom au double-clic\n        mouseWheelZoom: false, \/\/ zoom avec la molette de la souris\n        shiftDragZoom: false, \/\/ zoom avec d\u00e9placement souris + Shift\n        dragPan: false \/\/ d\u00e9placement avec souris\n    }),\n    controls:&#x5B;] \/\/ aucun contr\u00f4le\n});\n<\/pre><\/div>\n\n\n<p>On obtient alors une carte sans contr\u00f4les et compl\u00e8tement statique.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"440\" height=\"466\" src=\"https:\/\/geekcommunicant.com\/blog\/wp-content\/uploads\/carte-openlayers-no-controls.png\" alt=\"Carte OpenLayers sans contr\u00f4les\" class=\"wp-image-534\" srcset=\"https:\/\/geekcommunicant.com\/blog\/wp-content\/uploads\/carte-openlayers-no-controls.png 440w, https:\/\/geekcommunicant.com\/blog\/wp-content\/uploads\/carte-openlayers-no-controls-283x300.png 283w\" sizes=\"auto, (max-width: 440px) 100vw, 440px\" \/><\/figure><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Ajout des r\u00e9gions cliquables<\/h3>\n\n\n\n<p>Pour ajouter les r\u00e9gions cliquables, on va rajouter \u00e0 la carte une couche vectorielle.<\/p>\n\n\n\n<p>Disposant d\u00e9j\u00e0 des coordonn\u00e9es des diff\u00e9rentes r\u00e9gions dans le mapping HTML, on va utiliser celles-ci dans un objet <a title=\"GeoJSON\" href=\"https:\/\/en.wikipedia.org\/wiki\/GeoJSON\" target=\"_blank\" rel=\"noopener noreferrer\">GeoJSON<\/a>.<\/p>\n\n\n\n<p>Avec la magie des expressions r\u00e9guli\u00e8re dans mon \u00e9diteur de texte, je me suis rapidement retrouv\u00e9 avec un objet GeoJSON correspondant \u00e0 une r\u00e9gion (dans ce cas, l&rsquo;\u00cele-de-France).<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nvar geojsonObject = {\n    &#039;type&#039;: &#039;FeatureCollection&#039;,\n    &#039;features&#039;: &#x5B;{\n        &#039;type&#039;: &#039;Feature&#039;,\n\t&#039;geometry&#039;: {\n\t    &#039;type&#039;: &#039;Polygon&#039;,\n\t    &#039;coordinates&#039;: &#x5B;&#x5B;&#x5B;263,127],&#x5B;263,135],&#x5B;253,136],&#x5B;247,146],&#x5B;234,143],&#x5B;230,135],&#x5B;218,135],&#x5B;205,122],&#x5B;204,113],&#x5B;202,110],&#x5B;203,99],&#x5B;210,97],&#x5B;222,94],&#x5B;228,98],&#x5B;233,95],&#x5B;238,101],&#x5B;257,103],&#x5B;257,99],&#x5B;266,112],&#x5B;268,123],&#x5B;263,127]]]\n\t}\n    }]\n};\n<\/pre><\/div>\n\n\n<p>Il suffit ensuite d&rsquo;effectivement rajouter la couche vectorielle \u00e0 notre carte :<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nvar map = new ol.Map({\n\tlayers: &#x5B;\n\t\tnew ol.layer.Image({\n\t\t\tsource: new ol.source.ImageStatic({\n\t\t\t    url: &#039;lien_vers_votre_image&#039;,\n\t\t\t    projection: projection,\n\t\t\t    imageExtent: extent\n\t\t\t})\n\t\t}),\n\t\tnew ol.layer.Vector({\n\t\t    source: new ol.source.Vector({\n\t\t    \tfeatures: (new ol.format.GeoJSON()).readFeatures(geojsonObject)\n\t\t\t})\n\t\t})\n\t],\n\ttarget: &#039;map&#039;,\n\tview: new ol.View({\n\t\tprojection: projection,\n\t\tcenter: ol.extent.getCenter(extent),\n\t\tresolution: 1\n\t}),\n\tinteractions: ol.interaction.defaults({\n\t\taltShiftDragRotate: false,\n\t\tdoubleClickZoom: false,\n\t\tmouseWheelZoom: false,\n\t\tshiftDragZoom: false,\n\t\tdragPan: false\n\t}),\n\tcontrols:&#x5B;]\n});\n<\/pre><\/div>\n\n\n<p>Et l\u00e0, c&rsquo;est le drame&#8230;<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"445\" height=\"485\" src=\"https:\/\/geekcommunicant.com\/blog\/wp-content\/uploads\/coordonnes_inversees.png\" alt=\"Coordonn\u00e9es invers\u00e9es\" class=\"wp-image-614\" srcset=\"https:\/\/geekcommunicant.com\/blog\/wp-content\/uploads\/coordonnes_inversees.png 445w, https:\/\/geekcommunicant.com\/blog\/wp-content\/uploads\/coordonnes_inversees-275x300.png 275w\" sizes=\"auto, (max-width: 445px) 100vw, 445px\" \/><\/figure><\/div>\n\n\n\n<p>La r\u00e9gion est bien trac\u00e9e, mais invers\u00e9e.<\/p>\n\n\n\n<p>Au d\u00e9but j&rsquo;ai \u00e9t\u00e9 surpris, mais apr\u00e8s quelques recherches en ligne, je me suis vite aper\u00e7u d&rsquo;o\u00f9 venait le probl\u00e8me.<\/p>\n\n\n\n<p>La raison de cette inversion viens d&rsquo;une diff\u00e9rence d&rsquo;origine du rep\u00e8re sur l&rsquo;axe Y (vertical). Dans les images, l&rsquo;origine du rep\u00e8re se situe en haut \u00e0 gauche, alors que pour les coordonn\u00e9es g\u00e9ographiques, le rep\u00e8re se trouve en bas \u00e0 gauche.<\/p>\n\n\n\n<p>Pour inverser les coordonn\u00e9es, rien de plus simple. Les coordonn\u00e9es Y actuelles doivent \u00eatre remplac\u00e9es par la hauteur de l&rsquo;image (ici, 463) &#8211; la coordonn\u00e9e actuelle.<\/p>\n\n\n\n<p>Apr\u00e8s transformations par expressions r\u00e9guli\u00e8res et quelques copier-coller entre l&rsquo;\u00e9diteur de texte et un tableur, on se retrouve avec l&rsquo;objet GeoJSON suivant :<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nvar geojsonObject = {\n\t&#039;type&#039;: &#039;FeatureCollection&#039;,\n\t&#039;features&#039;: &#x5B;\n\t\t{\n\t\t\t&#039;type&#039;: &#039;Feature&#039;,\n\t\t\t&#039;geometry&#039; : {\n\t\t\t\t&#039;type&#039;: &#039;Polygon&#039;,\n\t\t\t\t&#039;coordinates&#039;: &#x5B;&#x5B;&#x5B;263, 336], &#x5B;263, 328], &#x5B;253, 327], &#x5B;247, 317], &#x5B;234, 320], &#x5B;230, 328], &#x5B;218, 328], &#x5B;205, 341], &#x5B;204, 350], &#x5B;202, 353], &#x5B;203, 364], &#x5B;210, 366], &#x5B;222, 369], &#x5B;228, 365], &#x5B;233, 368], &#x5B;238, 362], &#x5B;257, 360], &#x5B;257, 364], &#x5B;266, 351], &#x5B;268, 340], &#x5B;263, 336]]]\n\t\t\t},\n\t\t\t&#039;properties&#039;: {\n\t\t\t\t&#039;name&#039;: &#039;\u00cele-de-France&#039;,\n\t\t\t\t&#039;wiki&#039;: &#039;https:\/\/fr.wikipedia.org\/wiki\/%C3%8Ele-de-France&#039;\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t&#039;type&#039;: &#039;Feature&#039;,\n\t\t\t&#039;geometry&#039; : {\n\t\t\t\t&#039;type&#039;: &#039;Polygon&#039;,\n\t\t\t\t&#039;coordinates&#039;: &#x5B;&#x5B;&#x5B;215, 402], &#x5B;208, 407], &#x5B;208, 414], &#x5B;208, 421], &#x5B;212, 425], &#x5B;217, 423], &#x5B;225, 421], &#x5B;232, 415], &#x5B;241, 415], &#x5B;240, 411], &#x5B;260, 408], &#x5B;264, 402], &#x5B;272, 405], &#x5B;278, 403], &#x5B;284, 405], &#x5B;290, 400], &#x5B;295, 404], &#x5B;294, 394], &#x5B;290, 387], &#x5B;287, 375], &#x5B;273, 373], &#x5B;276, 365], &#x5B;272, 364], &#x5B;272, 354], &#x5B;266, 351], &#x5B;257, 364], &#x5B;257, 360], &#x5B;238, 362], &#x5B;233, 368], &#x5B;228, 365], &#x5B;222, 369], &#x5B;210, 366], &#x5B;212, 379], &#x5B;214, 382], &#x5B;212, 386], &#x5B;215, 393], &#x5B;215, 402]]]\n\t\t\t},\n\t\t\t&#039;properties&#039;: {\n\t\t\t\t&#039;name&#039;: &#039;Picardie&#039;,\n\t\t\t\t&#039;wiki&#039;: &#039;https:\/\/fr.wikipedia.org\/wiki\/Picardie_(ancienne_r%C3%A9gion_administrative)&#039;\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t&#039;type&#039;: &#039;Feature&#039;,\n\t\t\t&#039;geometry&#039; : {\n\t\t\t\t&#039;type&#039;: &#039;Polygon&#039;,\n\t\t\t\t&#039;coordinates&#039;: &#x5B;&#x5B;&#x5B;182, 386], &#x5B;168, 389], &#x5B;170, 397], &#x5B;177, 401], &#x5B;188, 404], &#x5B;201, 408], &#x5B;208, 414], &#x5B;208, 407], &#x5B;215, 402], &#x5B;215, 393], &#x5B;212, 386], &#x5B;214, 382], &#x5B;212, 379], &#x5B;210, 366], &#x5B;203, 364], &#x5B;202, 353], &#x5B;188, 348], &#x5B;180, 361], &#x5B;176, 361], &#x5B;176, 376], &#x5B;173, 386], &#x5B;182, 386]]]\n\t\t\t},\n\t\t\t&#039;properties&#039;: {\n\t\t\t\t&#039;name&#039;: &#039;Haute-Normandie&#039;,\n\t\t\t\t&#039;wiki&#039;: &#039;https:\/\/fr.wikipedia.org\/wiki\/Haute-Normandie&#039;\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t&#039;type&#039;: &#039;Feature&#039;,\n\t\t\t&#039;geometry&#039;: {\n\t\t\t\t&#039;type&#039;: &#039;Polygon&#039;,\n\t\t\t\t&#039;coordinates&#039;: &#x5B;&#x5B;&#x5B;117, 353], &#x5B;113, 356], &#x5B;115, 380], &#x5B;109, 395], &#x5B;111, 399], &#x5B;107, 402], &#x5B;110, 405], &#x5B;114, 401], &#x5B;124, 400], &#x5B;128, 403], &#x5B;132, 396], &#x5B;128, 394], &#x5B;131, 386], &#x5B;159, 381], &#x5B;173, 386], &#x5B;176, 376], &#x5B;176, 361], &#x5B;180, 361], &#x5B;188, 348], &#x5B;188, 334], &#x5B;183, 333], &#x5B;182, 328], &#x5B;172, 332], &#x5B;172, 337], &#x5B;169, 339], &#x5B;157, 336], &#x5B;157, 342], &#x5B;151, 347], &#x5B;136, 342], &#x5B;132, 347], &#x5B;128, 347], &#x5B;122, 349], &#x5B;118, 344], &#x5B;112, 347], &#x5B;112, 353], &#x5B;117, 353]]]\n\t\t\t},\n\t\t\t&#039;properties&#039;: {\n\t\t\t\t&#039;name&#039;: &#039;Basse-Normandie&#039;,\n\t\t\t\t&#039;wiki&#039;: &#039;https:\/\/fr.wikipedia.org\/wiki\/Basse-Normandie&#039;\n\t\t\t} \n\t\t},\n\t\t{\n\t\t\t&#039;type&#039;: &#039;Feature&#039;,\n\t\t\t&#039;geometry&#039;: {\n\t\t\t\t&#039;type&#039;: &#039;Polygon&#039;,\n\t\t\t\t&#039;coordinates&#039;: &#x5B;&#x5B;&#x5B;128, 347], &#x5B;122, 349], &#x5B;118, 344], &#x5B;112, 347], &#x5B;112, 353], &#x5B;107, 352], &#x5B;105, 356], &#x5B;102, 356], &#x5B;100, 353], &#x5B;96, 354], &#x5B;93, 352], &#x5B;93, 358], &#x5B;87, 356], &#x5B;79, 352], &#x5B;70, 365], &#x5B;70, 371], &#x5B;61, 368], &#x5B;54, 368], &#x5B;47, 360], &#x5B;43, 365], &#x5B;40, 360], &#x5B;36, 365], &#x5B;27, 362], &#x5B;23, 365], &#x5B;15, 360], &#x5B;12, 360], &#x5B;12, 356], &#x5B;9, 356], &#x5B;11, 350], &#x5B;20, 350], &#x5B;24, 353], &#x5B;23, 349], &#x5B;26, 347], &#x5B;20, 345], &#x5B;16, 347], &#x5B;13, 345], &#x5B;17, 341], &#x5B;20, 342], &#x5B;24, 338], &#x5B;20, 336], &#x5B;9, 336], &#x5B;18, 328], &#x5B;18, 323], &#x5B;26, 319], &#x5B;27, 324], &#x5B;32, 324], &#x5B;34, 321], &#x5B;43, 319], &#x5B;49, 313], &#x5B;52, 313], &#x5B;57, 310], &#x5B;56, 303], &#x5B;59, 298], &#x5B;60, 306], &#x5B;63, 308], &#x5B;70, 308], &#x5B;70, 306], &#x5B;65, 305], &#x5B;69, 300], &#x5B;81, 300], &#x5B;88, 303], &#x5B;90, 311], &#x5B;96, 311], &#x5B;100, 313], &#x5B;106, 313], &#x5B;111, 317], &#x5B;116, 313], &#x5B;122, 319], &#x5B;122, 322], &#x5B;128, 322], &#x5B;127, 328], &#x5B;124, 334], &#x5B;128, 337], &#x5B;128, 347]]]\n\t\t\t},\n\t\t\t&#039;properties&#039;: {\n\t\t\t\t&#039;name&#039;: &#039;Bretagne&#039;,\n\t\t\t\t&#039;wiki&#039;: &#039;https:\/\/fr.wikipedia.org\/wiki\/R%C3%A9gion_Bretagne&#039;\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t&#039;type&#039;: &#039;Feature&#039;,\n\t\t\t&#039;geometry&#039;: {\n\t\t\t\t&#039;type&#039;: &#039;Polygon&#039;,\n\t\t\t\t&#039;coordinates&#039;: &#x5B;&#x5B;&#x5B;182, 328], &#x5B;172, 332], &#x5B;172, 337], &#x5B;169, 339], &#x5B;157, 336], &#x5B;157, 342], &#x5B;151, 347], &#x5B;136, 342], &#x5B;132, 347], &#x5B;128, 347], &#x5B;128, 337], &#x5B;124, 334], &#x5B;127, 328], &#x5B;128, 322], &#x5B;122, 322], &#x5B;122, 319], &#x5B;116, 313], &#x5B;111, 317], &#x5B;106, 313], &#x5B;100, 313], &#x5B;96, 311], &#x5B;90, 311], &#x5B;88, 303], &#x5B;81, 300], &#x5B;77, 297], &#x5B;76, 293], &#x5B;73, 292], &#x5B;83, 289], &#x5B;88, 291], &#x5B;99, 289], &#x5B;89, 288], &#x5B;85, 284], &#x5B;92, 279], &#x5B;87, 275], &#x5B;87, 272], &#x5B;84, 270], &#x5B;91, 262], &#x5B;95, 252], &#x5B;98, 252], &#x5B;106, 243], &#x5B;112, 241], &#x5B;123, 243], &#x5B;126, 239], &#x5B;132, 243], &#x5B;129, 245], &#x5B;128, 255], &#x5B;132, 259], &#x5B;123, 266], &#x5B;123, 270], &#x5B;115, 277], &#x5B;130, 272], &#x5B;134, 277], &#x5B;152, 276], &#x5B;156, 279], &#x5B;155, 284], &#x5B;160, 288], &#x5B;160, 300], &#x5B;176, 300], &#x5B;176, 307], &#x5B;182, 311], &#x5B;184, 320], &#x5B;188, 320], &#x5B;182, 328]]]\n\t\t\t},\n\t\t\t&#039;properties&#039;: {\n\t\t\t\t&#039;name&#039;: &#039;Pays de la Loire&#039;,\n\t\t\t\t&#039;wiki&#039;: &#039;https:\/\/fr.wikipedia.org\/wiki\/Pays_de_la_Loire&#039;\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t&#039;type&#039;: &#039;Feature&#039;,\n\t\t\t&#039;geometry&#039;: {\n\t\t\t\t&#039;type&#039;: &#039;Polygon&#039;,\n\t\t\t\t&#039;coordinates&#039;: &#x5B;&#x5B;&#x5B;156, 279], &#x5B;155, 284], &#x5B;160, 288], &#x5B;160, 300], &#x5B;176, 300], &#x5B;176, 307], &#x5B;182, 311], &#x5B;184, 320], &#x5B;188, 320], &#x5B;182, 328], &#x5B;183, 333], &#x5B;188, 334], &#x5B;188, 348], &#x5B;202, 353], &#x5B;204, 350], &#x5B;205, 341], &#x5B;218, 328], &#x5B;230, 328], &#x5B;234, 320], &#x5B;247, 317], &#x5B;249, 316], &#x5B;249, 305], &#x5B;245, 297], &#x5B;249, 292], &#x5B;245, 289], &#x5B;245, 283], &#x5B;248, 279], &#x5B;247, 265], &#x5B;249, 261], &#x5B;249, 255], &#x5B;240, 252], &#x5B;232, 250], &#x5B;232, 241], &#x5B;221, 237], &#x5B;189, 238], &#x5B;183, 250], &#x5B;183, 258], &#x5B;178, 259], &#x5B;170, 270], &#x5B;162, 267], &#x5B;162, 276], &#x5B;156, 279]]]\n\t\t\t},\n\t\t\t&#039;properties&#039;: {\n\t\t\t\t&#039;name&#039;: &#039;Centre&#039;,\n\t\t\t\t&#039;wiki&#039;: &#039;https:\/\/fr.wikipedia.org\/wiki\/Centre-Val_de_Loire&#039;\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t&#039;type&#039;: &#039;Feature&#039;,\n\t\t\t&#039;geometry&#039;: {\n\t\t\t\t&#039;type&#039;: &#039;Polygon&#039;,\n\t\t\t\t&#039;coordinates&#039;: &#x5B;&#x5B;&#x5B;249, 255], &#x5B;249, 261], &#x5B;247, 265], &#x5B;248, 279], &#x5B;245, 283], &#x5B;245, 289], &#x5B;249, 292], &#x5B;245, 297], &#x5B;249, 305], &#x5B;249, 316], &#x5B;247, 317], &#x5B;253, 327], &#x5B;263, 328], &#x5B;267, 324], &#x5B;267, 319], &#x5B;273, 319], &#x5B;277, 309], &#x5B;286, 308], &#x5B;289, 305], &#x5B;304, 312], &#x5B;314, 302], &#x5B;314, 295], &#x5B;317, 292], &#x5B;327, 291], &#x5B;331, 287], &#x5B;327, 282], &#x5B;329, 278], &#x5B;328, 273], &#x5B;318, 259], &#x5B;324, 252], &#x5B;318, 252], &#x5B;322, 246], &#x5B;321, 239], &#x5B;308, 239], &#x5B;307, 229], &#x5B;304, 226], &#x5B;297, 230], &#x5B;289, 223], &#x5B;279, 224], &#x5B;274, 227], &#x5B;278, 231], &#x5B;278, 240], &#x5B;271, 245], &#x5B;267, 251], &#x5B;262, 248], &#x5B;250, 251], &#x5B;249, 255]]]\n\t\t\t},\n\t\t\t&#039;properties&#039;: {\n\t\t\t\t&#039;name&#039;: &#039;Bourgogne&#039;,\n\t\t\t\t&#039;wiki&#039;: &#039;https:\/\/fr.wikipedia.org\/wiki\/Bourgogne_(ancienne_r%C3%A9gion_administrative)&#039;\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t&#039;type&#039;: &#039;Feature&#039;,\n\t\t\t&#039;geometry&#039;: {\n\t\t\t\t&#039;type&#039;: &#039;Polygon&#039;,\n\t\t\t\t&#039;coordinates&#039;: &#x5B;&#x5B;&#x5B;120, 192], &#x5B;111, 206], &#x5B;105, 209], &#x5B;103, 212], &#x5B;95, 217], &#x5B;95, 222], &#x5B;102, 219], &#x5B;107, 216], &#x5B;114, 223], &#x5B;112, 227], &#x5B;115, 228], &#x5B;108, 237], &#x5B;112, 241], &#x5B;123, 243], &#x5B;126, 239], &#x5B;132, 243], &#x5B;129, 245], &#x5B;128, 255], &#x5B;132, 259], &#x5B;123, 266], &#x5B;123, 270], &#x5B;115, 277], &#x5B;130, 272], &#x5B;134, 277], &#x5B;152, 276], &#x5B;156, 279], &#x5B;162, 276], &#x5B;162, 267], &#x5B;170, 270], &#x5B;178, 259], &#x5B;183, 258], &#x5B;183, 250], &#x5B;189, 238], &#x5B;180, 234], &#x5B;172, 227], &#x5B;177, 217], &#x5B;167, 206], &#x5B;161, 204], &#x5B;158, 194], &#x5B;152, 194], &#x5B;152, 189], &#x5B;144, 184], &#x5B;143, 181], &#x5B;139, 178], &#x5B;134, 184], &#x5B;129, 184], &#x5B;129, 190], &#x5B;126, 192], &#x5B;120, 192]]]\n\t\t\t},\n\t\t\t&#039;properties&#039;: {\n\t\t\t\t&#039;name&#039;: &#039;Poitou-Charentes&#039;,\n\t\t\t\t&#039;wiki&#039;: &#039;https:\/\/fr.wikipedia.org\/wiki\/Poitou-Charentes&#039;\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t&#039;type&#039;: &#039;Feature&#039;,\n\t\t\t&#039;geometry&#039;: {\n\t\t\t\t&#039;type&#039;: &#039;Polygon&#039;,\n\t\t\t\t&#039;coordinates&#039;: &#x5B;&#x5B;&#x5B;167, 206], &#x5B;177, 217], &#x5B;172, 227], &#x5B;180, 234], &#x5B;189, 238], &#x5B;221, 237], &#x5B;222, 230], &#x5B;232, 221], &#x5B;232, 213], &#x5B;224, 210], &#x5B;227, 206], &#x5B;226, 203], &#x5B;230, 198], &#x5B;228, 194], &#x5B;227, 187], &#x5B;220, 186], &#x5B;219, 180], &#x5B;215, 176], &#x5B;215, 172], &#x5B;210, 167], &#x5B;189, 167], &#x5B;189, 177], &#x5B;182, 183], &#x5B;186, 188], &#x5B;186, 193], &#x5B;183, 193], &#x5B;174, 205], &#x5B;167, 206]]]\n\t\t\t},\n\t\t\t&#039;properties&#039;: {\n\t\t\t\t&#039;name&#039;: &#039;Limousin&#039;,\n\t\t\t\t&#039;wiki&#039;: &#039;https:\/\/fr.wikipedia.org\/wiki\/Limousin_(ancienne_r%C3%A9gion_administrative)&#039;\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t&#039;type&#039;: &#039;Feature&#039;,\n\t\t\t&#039;geometry&#039;: {\n\t\t\t\t&#039;type&#039;: &#039;Polygon&#039;,\n\t\t\t\t&#039;coordinates&#039;: &#x5B;&#x5B;&#x5B;210, 167], &#x5B;215, 172], &#x5B;215, 176], &#x5B;219, 180], &#x5B;220, 186], &#x5B;227, 187], &#x5B;228, 194], &#x5B;230, 198], &#x5B;226, 203], &#x5B;227, 206], &#x5B;224, 210], &#x5B;232, 213], &#x5B;232, 221], &#x5B;222, 230], &#x5B;221, 237], &#x5B;232, 241], &#x5B;232, 250], &#x5B;240, 252], &#x5B;249, 255], &#x5B;250, 251], &#x5B;262, 248], &#x5B;267, 251], &#x5B;271, 245], &#x5B;278, 240], &#x5B;278, 231], &#x5B;274, 227], &#x5B;272, 216], &#x5B;267, 211], &#x5B;271, 207], &#x5B;270, 203], &#x5B;277, 190], &#x5B;275, 183], &#x5B;285, 185], &#x5B;287, 181], &#x5B;290, 182], &#x5B;293, 175], &#x5B;292, 169], &#x5B;289, 169], &#x5B;288, 166], &#x5B;286, 165], &#x5B;285, 161], &#x5B;271, 156], &#x5B;265, 158], &#x5B;265, 161], &#x5B;263, 163], &#x5B;261, 157], &#x5B;257, 156], &#x5B;256, 162], &#x5B;252, 166], &#x5B;246, 161], &#x5B;242, 149], &#x5B;241, 156], &#x5B;238, 156], &#x5B;233, 166], &#x5B;225, 150], &#x5B;212, 152], &#x5B;213, 159], &#x5B;209, 161], &#x5B;210, 167]]]\n\t\t\t},\n\t\t\t&#039;properties&#039;: {\n\t\t\t\t&#039;name&#039;: &#039;Auvergne&#039;,\n\t\t\t\t&#039;wiki&#039;: &#039;https:\/\/fr.wikipedia.org\/wiki\/Auvergne&#039;\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t&#039;type&#039;: &#039;Feature&#039;,\n\t\t\t&#039;geometry&#039;: {\n\t\t\t\t&#039;type&#039;: &#039;Polygon&#039;,\n\t\t\t\t&#039;coordinates&#039;: &#x5B;&#x5B;&#x5B;121, 178], &#x5B;120, 192], &#x5B;126, 192], &#x5B;129, 190], &#x5B;129, 184], &#x5B;134, 184], &#x5B;139, 178], &#x5B;143, 181], &#x5B;144, 184], &#x5B;152, 189], &#x5B;152, 194], &#x5B;158, 194], &#x5B;161, 204], &#x5B;167, 206], &#x5B;174, 205], &#x5B;183, 193], &#x5B;186, 193], &#x5B;186, 188], &#x5B;182, 183], &#x5B;189, 177], &#x5B;189, 167], &#x5B;183, 159], &#x5B;182, 153], &#x5B;177, 154], &#x5B;177, 150], &#x5B;173, 148], &#x5B;174, 141], &#x5B;168, 141], &#x5B;171, 136], &#x5B;169, 130], &#x5B;164, 128], &#x5B;159, 126], &#x5B;153, 128], &#x5B;147, 125], &#x5B;140, 127], &#x5B;138, 121], &#x5B;136, 124], &#x5B;127, 121], &#x5B;127, 109], &#x5B;123, 106], &#x5B;133, 106], &#x5B;133, 99], &#x5B;136, 98], &#x5B;136, 92], &#x5B;127, 85], &#x5B;127, 81], &#x5B;123, 81], &#x5B;121, 71], &#x5B;110, 71], &#x5B;106, 79], &#x5B;91, 85], &#x5B;89, 88], &#x5B;85, 84], &#x5B;80, 87], &#x5B;85, 95], &#x5B;82, 99], &#x5B;78, 96], &#x5B;76, 99], &#x5B;71, 100], &#x5B;71, 103], &#x5B;80, 106], &#x5B;88, 118], &#x5B;96, 143], &#x5B;99, 160], &#x5B;106, 161], &#x5B;104, 165], &#x5B;100, 163], &#x5B;105, 191], &#x5B;105, 202], &#x5B;109, 204], &#x5B;111, 199], &#x5B;117, 192], &#x5B;121, 178]]]\n\t\t\t},\n\t\t\t&#039;properties&#039;: {\n\t\t\t\t&#039;name&#039;: &#039;Aquitaine&#039;,\n\t\t\t\t&#039;wiki&#039;: &#039;https:\/\/fr.wikipedia.org\/wiki\/Aquitaine_(ancienne_r%C3%A9gion)&#039;\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t&#039;type&#039;: &#039;Feature&#039;,\n\t\t\t&#039;geometry&#039;: {\n\t\t\t\t&#039;type&#039;: &#039;Polygon&#039;,\n\t\t\t\t&#039;coordinates&#039;: &#x5B;&#x5B;&#x5B;179, 57], &#x5B;186, 58], &#x5B;189, 56], &#x5B;188, 52], &#x5B;193, 50], &#x5B;205, 59], &#x5B;203, 62], &#x5B;199, 61], &#x5B;195, 66], &#x5B;199, 70], &#x5B;199, 77], &#x5B;192, 84], &#x5B;192, 91], &#x5B;196, 91], &#x5B;197, 94], &#x5B;201, 92], &#x5B;204, 94], &#x5B;211, 90], &#x5B;212, 94], &#x5B;221, 91], &#x5B;226, 94], &#x5B;223, 100], &#x5B;228, 102], &#x5B;232, 100], &#x5B;238, 104], &#x5B;241, 104], &#x5B;244, 111], &#x5B;248, 110], &#x5B;251, 113], &#x5B;251, 117], &#x5B;256, 121], &#x5B;251, 124], &#x5B;254, 127], &#x5B;245, 130], &#x5B;245, 144], &#x5B;242, 149], &#x5B;241, 156], &#x5B;238, 156], &#x5B;233, 166], &#x5B;225, 150], &#x5B;212, 152], &#x5B;213, 159], &#x5B;209, 161], &#x5B;210, 167], &#x5B;189, 167], &#x5B;183, 159], &#x5B;182, 153], &#x5B;177, 154], &#x5B;177, 150], &#x5B;173, 148], &#x5B;174, 141], &#x5B;168, 141], &#x5B;171, 136], &#x5B;169, 130], &#x5B;164, 128], &#x5B;159, 126], &#x5B;153, 128], &#x5B;147, 125], &#x5B;140, 127], &#x5B;138, 121], &#x5B;136, 124], &#x5B;127, 121], &#x5B;127, 109], &#x5B;123, 106], &#x5B;133, 106], &#x5B;133, 99], &#x5B;136, 98], &#x5B;136, 92], &#x5B;127, 85], &#x5B;127, 81], &#x5B;123, 81], &#x5B;121, 71], &#x5B;129, 66], &#x5B;137, 66], &#x5B;141, 62], &#x5B;144, 65], &#x5B;148, 65], &#x5B;154, 62], &#x5B;155, 70], &#x5B;159, 70], &#x5B;171, 63], &#x5B;176, 63], &#x5B;179, 57]]]\n\t\t\t},\n\t\t\t&#039;properties&#039;: {\n\t\t\t\t&#039;name&#039;: &#039;Midi-Pyr\u00e9n\u00e9es&#039;,\n\t\t\t\t&#039;wiki&#039;: &#039;https:\/\/fr.wikipedia.org\/wiki\/Midi-Pyr%C3%A9n%C3%A9es&#039;\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t&#039;type&#039;: &#039;Feature&#039;,\n\t\t\t&#039;geometry&#039;: {\n\t\t\t\t&#039;type&#039;: &#039;Polygon&#039;,\n\t\t\t\t&#039;coordinates&#039;: &#x5B;&#x5B;&#x5B;193, 50], &#x5B;205, 59], &#x5B;203, 62], &#x5B;199, 61], &#x5B;195, 66], &#x5B;199, 70], &#x5B;199, 77], &#x5B;192, 84], &#x5B;192, 91], &#x5B;196, 91], &#x5B;197, 94], &#x5B;201, 92], &#x5B;204, 94], &#x5B;211, 90], &#x5B;212, 94], &#x5B;221, 91], &#x5B;226, 94], &#x5B;223, 100], &#x5B;228, 102], &#x5B;232, 100], &#x5B;238, 104], &#x5B;241, 104], &#x5B;244, 111], &#x5B;248, 110], &#x5B;251, 113], &#x5B;251, 117], &#x5B;256, 121], &#x5B;251, 124], &#x5B;254, 127], &#x5B;245, 130], &#x5B;245, 144], &#x5B;242, 149], &#x5B;246, 161], &#x5B;252, 166], &#x5B;256, 162], &#x5B;257, 156], &#x5B;261, 157], &#x5B;262, 161], &#x5B;263, 163], &#x5B;265, 161], &#x5B;265, 158], &#x5B;271, 156], &#x5B;275, 140], &#x5B;279, 138], &#x5B;279, 134], &#x5B;286, 132], &#x5B;288, 135], &#x5B;292, 134], &#x5B;292, 132], &#x5B;302, 133], &#x5B;299, 128], &#x5B;305, 121], &#x5B;305, 115], &#x5B;297, 110], &#x5B;296, 102], &#x5B;291, 102], &#x5B;291, 98], &#x5B;285, 97], &#x5B;285, 92], &#x5B;279, 92], &#x5B;277, 97], &#x5B;272, 96], &#x5B;263, 87], &#x5B;261, 87], &#x5B;253, 83], &#x5B;248, 83], &#x5B;242, 78], &#x5B;238, 70], &#x5B;238, 53], &#x5B;244, 47], &#x5B;241, 44], &#x5B;238, 46], &#x5B;228, 46], &#x5B;224, 40], &#x5B;221, 45], &#x5B;216, 40], &#x5B;207, 47], &#x5B;199, 42], &#x5B;193, 50]]]\n\t\t\t},\n\t\t\t&#039;properties&#039;: {\n\t\t\t\t&#039;name&#039;: &#039;Languedoc-Roussillon&#039;,\n\t\t\t\t&#039;wiki&#039;: &#039;https:\/\/fr.wikipedia.org\/wiki\/Languedoc-Roussillon&#039;\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t&#039;type&#039;: &#039;Feature&#039;,\n\t\t\t&#039;geometry&#039;: {\n\t\t\t\t&#039;type&#039;: &#039;Polygon&#039;,\n\t\t\t\t&#039;coordinates&#039;: &#x5B;&#x5B;&#x5B;409, 72], &#x5B;415, 72], &#x5B;415, 59], &#x5B;416, 55], &#x5B;416, 36], &#x5B;411, 32], &#x5B;409, 10], &#x5B;404, 5], &#x5B;400, 11], &#x5B;392, 12], &#x5B;394, 14], &#x5B;391, 17], &#x5B;395, 22], &#x5B;387, 24], &#x5B;391, 28], &#x5B;386, 29], &#x5B;390, 35], &#x5B;385, 36], &#x5B;385, 42], &#x5B;387, 43], &#x5B;387, 49], &#x5B;393, 57], &#x5B;401, 58], &#x5B;404, 61], &#x5B;407, 59], &#x5B;409, 72]]]\n\t\t\t},\n\t\t\t&#039;properties&#039;: {\n\t\t\t\t&#039;name&#039;: &#039;Corse&#039;,\n\t\t\t\t&#039;wiki&#039;: &#039;https:\/\/fr.wikipedia.org\/wiki\/Collectivit%C3%A9_territoriale_de_Corse&#039;\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t&#039;type&#039;: &#039;Feature&#039;,\n\t\t\t&#039;geometry&#039;: {\n\t\t\t\t&#039;type&#039;: &#039;Polygon&#039;,\n\t\t\t\t&#039;coordinates&#039;: &#x5B;&#x5B;&#x5B;376, 133], &#x5B;389, 124], &#x5B;405, 124], &#x5B;407, 118], &#x5B;402, 113], &#x5B;398, 103], &#x5B;389, 102], &#x5B;383, 94], &#x5B;379, 94], &#x5B;374, 87], &#x5B;370, 87], &#x5B;366, 84], &#x5B;371, 82], &#x5B;366, 77], &#x5B;360, 77], &#x5B;358, 73], &#x5B;350, 76], &#x5B;350, 72], &#x5B;342, 74], &#x5B;342, 72], &#x5B;335, 73], &#x5B;331, 78], &#x5B;321, 78], &#x5B;318, 81], &#x5B;321, 83], &#x5B;317, 86], &#x5B;311, 85], &#x5B;306, 90], &#x5B;304, 90], &#x5B;302, 85], &#x5B;295, 87], &#x5B;291, 92], &#x5B;285, 92], &#x5B;285, 97], &#x5B;291, 98], &#x5B;291, 102], &#x5B;296, 102], &#x5B;297, 110], &#x5B;305, 115], &#x5B;305, 121], &#x5B;299, 128], &#x5B;302, 133], &#x5B;307, 130], &#x5B;317, 134], &#x5B;314, 127], &#x5B;318, 130], &#x5B;326, 124], &#x5B;329, 126], &#x5B;332, 126], &#x5B;335, 128], &#x5B;331, 133], &#x5B;324, 138], &#x5B;327, 140], &#x5B;334, 140], &#x5B;334, 143], &#x5B;330, 146], &#x5B;333, 148], &#x5B;337, 148], &#x5B;341, 154], &#x5B;352, 158], &#x5B;357, 156], &#x5B;357, 162], &#x5B;352, 165], &#x5B;352, 169], &#x5B;359, 167], &#x5B;368, 170], &#x5B;375, 158], &#x5B;381, 158], &#x5B;381, 148], &#x5B;378, 148], &#x5B;374, 142], &#x5B;378, 137], &#x5B;376, 133]]]\n\t\t\t},\n\t\t\t&#039;properties&#039;: {\n\t\t\t\t&#039;name&#039;: &#039;Provence-Alpes-C\u00f4te d\\&#039;Azur&#039;,\n\t\t\t\t&#039;wiki&#039;: &#039;https:\/\/fr.wikipedia.org\/wiki\/Provence-Alpes-C%C3%B4te_d%27Azur&#039;\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t&#039;type&#039;: &#039;Feature&#039;,\n\t\t\t&#039;geometry&#039;: {\n\t\t\t\t&#039;type&#039;: &#039;Polygon&#039;,\n\t\t\t\t&#039;coordinates&#039;: &#x5B;&#x5B;&#x5B;368, 170], &#x5B;359, 167], &#x5B;352, 169], &#x5B;352, 165], &#x5B;357, 162], &#x5B;357, 156], &#x5B;352, 158], &#x5B;341, 154], &#x5B;337, 148], &#x5B;333, 148], &#x5B;330, 146], &#x5B;334, 143], &#x5B;334, 140], &#x5B;327, 140], &#x5B;324, 138], &#x5B;331, 133], &#x5B;335, 128], &#x5B;332, 126], &#x5B;329, 126], &#x5B;326, 124], &#x5B;318, 130], &#x5B;314, 127], &#x5B;317, 134], &#x5B;307, 130], &#x5B;302, 133], &#x5B;292, 132], &#x5B;292, 134], &#x5B;288, 135], &#x5B;286, 132], &#x5B;279, 134], &#x5B;279, 138], &#x5B;275, 140], &#x5B;271, 156], &#x5B;285, 161], &#x5B;286, 165], &#x5B;288, 166], &#x5B;289, 169], &#x5B;292, 169], &#x5B;293, 175], &#x5B;290, 182], &#x5B;287, 181], &#x5B;285, 185], &#x5B;275, 183], &#x5B;277, 190], &#x5B;270, 203], &#x5B;271, 207], &#x5B;267, 211], &#x5B;272, 216], &#x5B;274, 227], &#x5B;279, 224], &#x5B;289, 223], &#x5B;297, 230], &#x5B;304, 226], &#x5B;307, 229], &#x5B;308, 239], &#x5B;321, 239], &#x5B;323, 235], &#x5B;320, 233], &#x5B;326, 226], &#x5B;330, 229], &#x5B;335, 226], &#x5B;350, 235], &#x5B;353, 227], &#x5B;347, 222], &#x5B;349, 219], &#x5B;356, 223], &#x5B;357, 230], &#x5B;362, 232], &#x5B;376, 233], &#x5B;378, 224], &#x5B;373, 223], &#x5B;382, 214], &#x5B;381, 207], &#x5B;376, 205], &#x5B;375, 200], &#x5B;380, 196], &#x5B;382, 188], &#x5B;387, 185], &#x5B;385, 182], &#x5B;385, 174], &#x5B;380, 174], &#x5B;377, 170], &#x5B;368, 170]]]\n\t\t\t},\n\t\t\t&#039;properties&#039;: {\n\t\t\t\t&#039;name&#039;: &#039;Rh\u00f4ne-Alpes&#039;,\n\t\t\t\t&#039;wiki&#039;: &#039;https:\/\/fr.wikipedia.org\/wiki\/Rh%C3%B4ne-Alpes&#039;\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t&#039;type&#039;: &#039;Feature&#039;,\n\t\t\t&#039;geometry&#039;: {\n\t\t\t\t&#039;type&#039;: &#039;Polygon&#039;,\n\t\t\t\t&#039;coordinates&#039;: &#x5B;&#x5B;&#x5B;350, 235], &#x5B;335, 226], &#x5B;330, 229], &#x5B;326, 226], &#x5B;320, 233], &#x5B;323, 235], &#x5B;321, 239], &#x5B;322, 246], &#x5B;318, 252], &#x5B;324, 252], &#x5B;318, 259], &#x5B;328, 273], &#x5B;329, 278], &#x5B;327, 282], &#x5B;331, 287], &#x5B;327, 291], &#x5B;331, 295], &#x5B;334, 293], &#x5B;336, 295], &#x5B;336, 300], &#x5B;342, 307], &#x5B;351, 309], &#x5B;352, 305], &#x5B;360, 306], &#x5B;364, 301], &#x5B;366, 306], &#x5B;373, 299], &#x5B;379, 295], &#x5B;379, 291], &#x5B;382, 289], &#x5B;382, 284], &#x5B;378, 281], &#x5B;382, 281], &#x5B;383, 275], &#x5B;363, 260], &#x5B;361, 253], &#x5B;354, 248], &#x5B;354, 241], &#x5B;350, 235]]]\n\t\t\t},\n\t\t\t&#039;properties&#039;: {\n\t\t\t\t&#039;name&#039;: &#039;France-Comt\u00e9&#039;,\n\t\t\t\t&#039;wiki&#039;: &#039;https:\/\/fr.wikipedia.org\/wiki\/Franche-Comt%C3%A9&#039;\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t&#039;type&#039;: &#039;Feature&#039;,\n\t\t\t&#039;geometry&#039;: {\n\t\t\t\t&#039;type&#039;: &#039;Polygon&#039;,\n\t\t\t\t&#039;coordinates&#039;: &#x5B;&#x5B;&#x5B;420, 355], &#x5B;418, 347], &#x5B;412, 344], &#x5B;400, 312], &#x5B;402, 308], &#x5B;397, 297], &#x5B;399, 290], &#x5B;394, 283], &#x5B;391, 283], &#x5B;388, 281], &#x5B;382, 284], &#x5B;382, 289], &#x5B;379, 291], &#x5B;379, 295], &#x5B;373, 299], &#x5B;381, 311], &#x5B;381, 318], &#x5B;386, 324], &#x5B;383, 325], &#x5B;382, 333], &#x5B;388, 339], &#x5B;392, 345], &#x5B;389, 347], &#x5B;382, 345], &#x5B;379, 351], &#x5B;383, 358], &#x5B;390, 351], &#x5B;397, 354], &#x5B;399, 360], &#x5B;404, 360], &#x5B;420, 355]]]\n\t\t\t},\n\t\t\t&#039;properties&#039;: {\n\t\t\t\t&#039;name&#039;: &#039;Alsace&#039;,\n\t\t\t\t&#039;wiki&#039;: &#039;https:\/\/fr.wikipedia.org\/wiki\/R%C3%A9gion_Alsace&#039;\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t&#039;type&#039;: &#039;Feature&#039;,\n\t\t\t&#039;geometry&#039;: {\n\t\t\t\t&#039;type&#039;: &#039;Polygon&#039;,\n\t\t\t\t&#039;coordinates&#039;: &#x5B;&#x5B;&#x5B;341, 383], &#x5B;349, 377], &#x5B;358, 380], &#x5B;360, 378], &#x5B;365, 378], &#x5B;374, 366], &#x5B;378, 369], &#x5B;387, 363], &#x5B;392, 366], &#x5B;399, 365], &#x5B;399, 360], &#x5B;397, 354], &#x5B;390, 351], &#x5B;383, 358], &#x5B;379, 351], &#x5B;382, 345], &#x5B;389, 347], &#x5B;392, 345], &#x5B;388, 339], &#x5B;382, 333], &#x5B;383, 325], &#x5B;386, 324], &#x5B;381, 318], &#x5B;381, 311], &#x5B;373, 299], &#x5B;366, 306], &#x5B;364, 301], &#x5B;360, 306], &#x5B;352, 305], &#x5B;351, 309], &#x5B;342, 307], &#x5B;335, 313], &#x5B;338, 316], &#x5B;338, 322], &#x5B;330, 324], &#x5B;329, 330], &#x5B;314, 340], &#x5B;312, 347], &#x5B;316, 347], &#x5B;317, 357], &#x5B;314, 359], &#x5B;314, 366], &#x5B;321, 382], &#x5B;326, 380], &#x5B;327, 382], &#x5B;332, 382], &#x5B;341, 383]]]\n\t\t\t},\n\t\t\t&#039;properties&#039;: {\n\t\t\t\t&#039;name&#039;: &#039;Lorraine&#039;,\n\t\t\t\t&#039;wiki&#039;: &#039;https:\/\/fr.wikipedia.org\/wiki\/Lorraine_(ancienne_r%C3%A9gion_administrative)&#039;\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t&#039;type&#039;: &#039;Feature&#039;,\n\t\t\t&#039;geometry&#039;: {\n\t\t\t\t&#039;type&#039;: &#039;Polygon&#039;,\n\t\t\t\t&#039;coordinates&#039;: &#x5B;&#x5B;&#x5B;295, 404], &#x5B;294, 394], &#x5B;290, 387], &#x5B;287, 375], &#x5B;273, 373], &#x5B;276, 365], &#x5B;272, 364], &#x5B;272, 354], &#x5B;266, 351], &#x5B;268, 340], &#x5B;263, 336], &#x5B;263, 328], &#x5B;267, 324], &#x5B;267, 319], &#x5B;273, 319], &#x5B;277, 308], &#x5B;286, 308], &#x5B;289, 305], &#x5B;304, 312], &#x5B;314, 302], &#x5B;314, 295], &#x5B;317, 292], &#x5B;327, 291], &#x5B;331, 295], &#x5B;334, 293], &#x5B;336, 295], &#x5B;336, 300], &#x5B;342, 307], &#x5B;335, 313], &#x5B;338, 316], &#x5B;338, 322], &#x5B;330, 324], &#x5B;329, 330], &#x5B;314, 340], &#x5B;312, 347], &#x5B;316, 347], &#x5B;317, 357], &#x5B;314, 359], &#x5B;314, 366], &#x5B;321, 382], &#x5B;326, 380], &#x5B;327, 382], &#x5B;332, 382], &#x5B;318, 395], &#x5B;314, 395], &#x5B;314, 412], &#x5B;304, 405], &#x5B;295, 404]]]\n\t\t\t},\n\t\t\t&#039;properties&#039;: {\n\t\t\t\t&#039;name&#039;: &#039;Champagne-Ardenne&#039;,\n\t\t\t\t&#039;wiki&#039;: &#039;https:\/\/fr.wikipedia.org\/wiki\/Champagne-Ardenne&#039;\n\t\t\t}\n\t\t},\n\t\t{\n\t\t\t&#039;type&#039;: &#039;Feature&#039;,\n\t\t\t&#039;geometry&#039;: {\n\t\t\t\t&#039;type&#039;: &#039;Polygon&#039;,\n\t\t\t\t&#039;coordinates&#039;: &#x5B;&#x5B;&#x5B;215, 447], &#x5B;221, 451], &#x5B;246, 455], &#x5B;248, 443], &#x5B;254, 439], &#x5B;264, 442], &#x5B;269, 429], &#x5B;276, 429], &#x5B;279, 420], &#x5B;293, 418], &#x5B;295, 404], &#x5B;290, 400], &#x5B;284, 405], &#x5B;278, 403], &#x5B;272, 405], &#x5B;264, 402], &#x5B;260, 408], &#x5B;240, 411], &#x5B;241, 415], &#x5B;232, 415], &#x5B;225, 421], &#x5B;217, 423], &#x5B;212, 425], &#x5B;215, 447]]]\n\t\t\t},\n\t\t\t&#039;properties&#039;: {\n\t\t\t\t&#039;name&#039;: &#039;Nord-Pas-de-Calais&#039;,\n\t\t\t\t&#039;wiki&#039;: &#039;https:\/\/fr.wikipedia.org\/wiki\/Nord-Pas-de-Calais&#039;\n\t\t\t}\n\t\t}\n\t] \n}\n<\/pre><\/div>\n\n\n<p>Notez pour chaque r\u00e9gion l&rsquo;attribut &lsquo;properties&rsquo;. Les donn\u00e9es pr\u00e9sentes dans cet array servirons pour nos interactivit\u00e9s sur la carte.<\/p>\n\n\n\n<p>En utilisant ce nouvel objet on obtient alors le r\u00e9sultat suivant :<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"423\" height=\"468\" src=\"https:\/\/geekcommunicant.com\/blog\/wp-content\/uploads\/regions-bons-traces.png\" alt=\"R\u00e9gions, bons trac\u00e9s\" class=\"wp-image-617\" srcset=\"https:\/\/geekcommunicant.com\/blog\/wp-content\/uploads\/regions-bons-traces.png 423w, https:\/\/geekcommunicant.com\/blog\/wp-content\/uploads\/regions-bons-traces-271x300.png 271w\" sizes=\"auto, (max-width: 423px) 100vw, 423px\" \/><\/figure><\/div>\n\n\n\n<!--nextpage-->\n\n\n\n<h3 class=\"wp-block-heading\">Ajout d&rsquo;interactivit\u00e9s<\/h3>\n\n\n\n<p>Maintenant, il reste \u00e0 rajouter de l&rsquo;interactivit\u00e9 sur la carte.<\/p>\n\n\n\n<p>Les interactivit\u00e9s que nous allons rajouter sont :<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>surlignage et ajout d&rsquo;\u00e9tiquette au survol de souris<\/li><li>rendre les r\u00e9gions cliquables<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">Surlignage des r\u00e9gions<\/h4>\n\n\n\n<p>Premi\u00e8re \u00e9tape, rendre les r\u00e9gions invisible. Pour cela, il suffit simplement d&rsquo;ajouter un attribut &lsquo;opacity&rsquo; au calque vectoriel. Et cet attribut doit \u00eatre \u00e0 z\u00e9ro.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nvar map = new ol.Map({\n\tlayers: &#x5B;\n\t\tnew ol.layer.Image({\n\t\t\tsource: new ol.source.ImageStatic({\n\t\t\t\turl: &#039;lien_vers_votre_image&#039;,\n\t\t\t\tprojection: projection,\n\t\t\t\timageExtent: extent\n\t\t\t})\n\t\t}),\n\t\tnew ol.layer.Vector({\n\t\t\tsource: new ol.source.Vector({\n\t\t\t\tfeatures: (new ol.format.GeoJSON()).readFeatures(geojsonObject)\n\t\t\t}),\n\t\t\topacity: 0\n\t\t})\n\t],\n\ttarget: &#039;map&#039;,\n\tview: new ol.View({\n\t\tprojection: projection,\n\t\tcenter: ol.extent.getCenter(extent),\n\t\tresolution: 1\n\t}),\n\tinteractions: ol.interaction.defaults({\n\t\taltShiftDragRotate: false,\n\t\tdoubleClickZoom: false,\n\t\tmouseWheelZoom: false,\n\t\tshiftDragZoom: false,\n\t\tdragPan: false\n\t}),\n\tcontrols:&#x5B;]\n});\n<\/pre><\/div>\n\n\n<p>Pour surligner les r\u00e9gions, il faut ajouter un style au survol de l&rsquo;une d&rsquo;elle.<\/p>\n\n\n\n<p>Le style que l&rsquo;on veut ajouter \u00e0 la r\u00e9gion survol\u00e9e comprenant une \u00e9tiquette, il faut utiliser une fonction.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nfunction regionStyleFunction(feature, resolution) {\n\treturn new ol.style.Style({\n\t\tfill: new ol.style.Fill({color: &#039;rgba(174,174,174, 0.5)&#039;}), \/\/ remplissage\n\t\tstroke: new ol.style.Stroke({width: 1, color: &#039;rgba(0,0,0,0.5)&#039;}), \/\/ contour\n\t\ttext: new ol.style.Text({\n\t\t\toverflow: true,\n\t\t\tfont: &#039;14px sans-serif&#039;,\n\t\t\tstroke: new ol.style.Stroke({\n\t\t\t\twidth:2, \n\t\t\t\tcolor: &#039;rgba(255,255,255,1)&#039;\n\t\t\t}),\n\t\t\ttext: feature.get(&#039;name&#039;) \/\/ on r\u00e9cup\u00e8re la propri\u00e9t\u00e9 &#039;name&#039; de la r\u00e9gion survol\u00e9e\n\t\t})\n\t});\n}\n<\/pre><\/div>\n\n\n<p>Ensuite, on cr\u00e9e l&rsquo;interaction pour appliquer le style :<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nvar hover = new ol.interaction.Select({\n    condition: ol.events.condition.pointerMove, \/\/ d\u00e9clenchement au d\u00e9placement de la souris\n    style: regionStyleFunction \/\/ style \u00e0 appliquer, ici le r\u00e9sultat de la fonction ci-dessus\n});\n\nmap.addInteraction(hover); \/\/ on ajoute l&#039;interaction \u00e0 la carte\n<\/pre><\/div>\n\n\n<h4 class=\"wp-block-heading\">Rendre les r\u00e9gions cliquables<\/h4>\n\n\n\n<p>Pour indiquer que la r\u00e9gion est cliquable, au survol de la r\u00e9gion, on change le pointeur de la souris pour qu&rsquo;il soit celui indiquant un lien.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nmap.on(&#039;pointermove&#039;, function(e) {\n    if (e.dragging) return; \/\/ si il y a d\u00e9placement de la carte, on arr\u00eate\n\t\n    var pixel = map.getEventPixel(e.originalEvent);\n    var hit = map.hasFeatureAtPixel(pixel); \/\/ on v\u00e9rifie si il y a un objet \u00e0 l&#039;endroit de l&#039;\u00e9v\u00e9nement\n\t\n    map.getTargetElement().style.cursor = hit ? &#039;pointer&#039; : &#039;&#039;; \/\/ si besoin, on change le curseur\n});\n<\/pre><\/div>\n\n\n<p>Ensuite, on ajoute la gestion du clic sur la carte.<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\nmap.on(&#039;click&#039;, function(evt) {\n    \/\/ on v\u00e9rifie si il y a un objet \u00e0 l&#039;endroit du clic\n    var feature = map.forEachFeatureAtPixel(evt.pixel, function(feature) {\n        return feature;\n    });\n    \n    if (feature) {\n        window.open(feature.get(&quot;wiki&quot;), &quot;_blank&quot;); \/\/ on ouvre dans un nouvel onglet le site correspondant \u00e0 la propri\u00e9t\u00e9 &quot;wiki&quot; de la r\u00e9gion cibl\u00e9e\n    }\n});\n<\/pre><\/div>\n\n\n<h2 class=\"wp-block-heading\">Et voil\u00e0 !<\/h2>\n\n\n\n<p>Cet article est maintenant termin\u00e9. J&rsquo;esp\u00e8re qu&rsquo;il vous a \u00e9t\u00e9 utile.<\/p>\n\n\n\n<p>Un exemple fonctionnel est disponible <a href=\"https:\/\/geekcommunicant.com\/demos\/remake-map-openlayers.html\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"ici (opens in a new tab)\" title=\"[D\u00e9mo] Remake de ma carte avec OpenLayers\">ici<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Il n&rsquo;y a pas tr\u00e8s longtemps, en faisant la maintenance de mon site (oui, m\u00eame si le contenu n&rsquo;\u00e9volue quasiment pas, le site n&rsquo;est pas \u00e0 l&rsquo;abandon) je suis retomb\u00e9 sur la carte interactive que j&rsquo;avais r\u00e9alis\u00e9es plusieurs ann\u00e9es auparavant. &hellip; <a href=\"https:\/\/geekcommunicant.com\/blog\/2019\/04\/08\/remake-carte-openlayers\/\">Continuer la lecture <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[19],"tags":[14,31,40],"class_list":["post-512","post","type-post","status-publish","format-standard","hentry","category-javascript","tag-carte-interactive","tag-javascript","tag-openlayers"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p2IoOb-8g","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"jetpack-related-posts":[{"id":1261,"url":"https:\/\/geekcommunicant.com\/blog\/2024\/11\/04\/personnaliser-marqueur-carte-openlayers\/","url_meta":{"origin":512,"position":0},"title":"Personnaliser le marqueur d&rsquo;une carte OpenLayers","author":"geekc","date":"04\/11\/2024","format":false,"excerpt":"Dans un tuto pr\u00e9c\u00e9dent sur la r\u00e9alisation d\u2019une carte \u00e0 l\u2019aide d\u2019OpenLayers (carte du m\u00e9tro), j\u2019ai utilis\u00e9 des marqueurs personnalis\u00e9s, mais comme ce n\u2019\u00e9tait pas l\u2019int\u00e9r\u00eat majeur du tuto, ne me suis pas attard\u00e9 sur ce point. Et c\u2019est justement sur ce point, la personnalisation des marqueurs d\u2019une carte OpenLayers,\u2026","rel":"","context":"Dans &quot;JavaScript&quot;","block_context":{"text":"JavaScript","link":"https:\/\/geekcommunicant.com\/blog\/category\/javascript\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":848,"url":"https:\/\/geekcommunicant.com\/blog\/2019\/07\/01\/carte-interactive-rues-sans-megots-openlayers\/","url_meta":{"origin":512,"position":1},"title":"Carte interactive des rues sans m\u00e9gots avec OpenLayers","author":"geekc","date":"01\/07\/2019","format":false,"excerpt":"Bon, je suppose que vous commencez \u00e0 avoir l\u2019habitude que je vous pr\u00e9sente la mani\u00e8re de cr\u00e9er une carte interactive \u00e0 l\u2019aide des deux librairies majeures OpenLayers et Leaflet. Apr\u00e8s avoir rapidement cr\u00e9\u00e9 la carte des rues et sections de rue concern\u00e9es par l\u2019op\u00e9ration \u00ab\u00a0Des rues sans m\u00e9gots\u00a0\u00bb avec Leaflet,\u2026","rel":"","context":"Dans &quot;JavaScript&quot;","block_context":{"text":"JavaScript","link":"https:\/\/geekcommunicant.com\/blog\/category\/javascript\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":832,"url":"https:\/\/geekcommunicant.com\/blog\/2019\/06\/17\/carte-interactive-metro-paris-openlayers\/","url_meta":{"origin":512,"position":2},"title":"Carte interactive du m\u00e9tro de Paris avec OpenLayers","author":"geekc","date":"17\/06\/2019","format":false,"excerpt":"Apr\u00e8s vous avoir cr\u00e9\u00e9 une carte interactive du m\u00e9tro de Paris avec la librairie Leaflet (voir mon pr\u00e9c\u00e9dent article), j\u2019ai d\u00e9cid\u00e9 de recr\u00e9er cette carte avec l\u2019autre libraire majeure de cartographie en ligne\u00a0: OpenLayers (que j\u2019ai d\u00e9j\u00e0 utilis\u00e9e pour ma carte utilisant un fond statique). Donn\u00e9es utilis\u00e9es Les donn\u00e9es utilis\u00e9es\u2026","rel":"","context":"Dans &quot;JavaScript&quot;","block_context":{"text":"JavaScript","link":"https:\/\/geekcommunicant.com\/blog\/category\/javascript\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":860,"url":"https:\/\/geekcommunicant.com\/blog\/2019\/07\/15\/carte-interactive-openlayers-controle-calques\/","url_meta":{"origin":512,"position":3},"title":"Carte interactive OpenLayers avec contr\u00f4le de calques","author":"geekc","date":"15\/07\/2019","format":false,"excerpt":"Apr\u00e8s avoir r\u00e9alis\u00e9 une carte historique de la ligne 2 du tramway d\u2019\u00cele-de-France avec Leaflet (voir le tutoriel), je me suis attaqu\u00e9 \u00e0 la cr\u00e9ation de cette m\u00eame carte avec OpenLayers. Bien que plus complet sur certains points, OpenLayers n\u2019inclus pas nativement deux fonctionnalit\u00e9s utilis\u00e9es dans la carte\u00a0: Le contr\u00f4le\u2026","rel":"","context":"Dans &quot;JavaScript&quot;","block_context":{"text":"JavaScript","link":"https:\/\/geekcommunicant.com\/blog\/category\/javascript\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":1271,"url":"https:\/\/geekcommunicant.com\/blog\/2024\/11\/11\/marqueur-personnalise-leaflet\/","url_meta":{"origin":512,"position":4},"title":"Un marqueur personnalis\u00e9 avec Leaflet","author":"geekc","date":"11\/11\/2024","format":false,"excerpt":"Lors de mon tutoriel sur la carte du m\u00e9tro de Paris avec Leaflet, j\u2019ai d\u00e9j\u00e0 personnalis\u00e9 les marqueurs de cette carte, mais comme dans le cadre du tutoriel c\u2019\u00e9tait assez secondaire, je n\u2019ai pas d\u00e9taill\u00e9 ce point. Aujourd\u2019hui est venu le temps de revenir sur la mani\u00e8re d\u2019utiliser nos propres\u2026","rel":"","context":"Dans &quot;JavaScript&quot;","block_context":{"text":"JavaScript","link":"https:\/\/geekcommunicant.com\/blog\/category\/javascript\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":727,"url":"https:\/\/geekcommunicant.com\/blog\/2019\/04\/15\/retour-premiere-carte-interactive\/","url_meta":{"origin":512,"position":5},"title":"Retour sur ma premi\u00e8re carte interactive","author":"geekc","date":"15\/04\/2019","format":false,"excerpt":"Dans mon dernier article (voir), j'ai indiqu\u00e9 que la premi\u00e8re solution de carte interactive que j'avais pr\u00e9sent\u00e9e dans une s\u00e9rie de deux articles (1 et 2) ne fonctionnait pas sous Chrome. R\u00e9cemment, en consultant le code d'une page de reserves-naturelles.org, je me suis aper\u00e7u que la carte des r\u00e9gions de\u2026","rel":"","context":"Dans &quot;JavaScript&quot;","block_context":{"text":"JavaScript","link":"https:\/\/geekcommunicant.com\/blog\/category\/javascript\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"https:\/\/geekcommunicant.com\/blog\/wp-json\/wp\/v2\/posts\/512","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/geekcommunicant.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/geekcommunicant.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/geekcommunicant.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/geekcommunicant.com\/blog\/wp-json\/wp\/v2\/comments?post=512"}],"version-history":[{"count":0,"href":"https:\/\/geekcommunicant.com\/blog\/wp-json\/wp\/v2\/posts\/512\/revisions"}],"wp:attachment":[{"href":"https:\/\/geekcommunicant.com\/blog\/wp-json\/wp\/v2\/media?parent=512"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/geekcommunicant.com\/blog\/wp-json\/wp\/v2\/categories?post=512"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/geekcommunicant.com\/blog\/wp-json\/wp\/v2\/tags?post=512"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}