{"id":34329,"date":"2025-09-15T12:46:41","date_gmt":"2025-09-15T10:46:41","guid":{"rendered":"https:\/\/fondation-farm.org\/?page_id=34329"},"modified":"2026-02-25T17:27:01","modified_gmt":"2026-02-25T16:27:01","slug":"carte-leaflet","status":"publish","type":"page","link":"https:\/\/fondation-farm.org\/en\/carte-leaflet\/","title":{"rendered":"Carte Leaflet"},"content":{"rendered":"\n<!-- Leaflet (CDN) -->\n<link rel=\"stylesheet\" href=\"https:\/\/unpkg.com\/leaflet@1.9.4\/dist\/leaflet.css\" \/>\n<style>\n  #map-aaccmed { height: 620px; width: 100%; }\n  #map-aaccmed { border: 1px solid #e6e6e6; border-radius: 6px; }\n<\/style>\n\n<div id=\"map-aaccmed\" role=\"region\" aria-label=\"Carte AACCMed\"><\/div>\n\n<script src=\"https:\/\/unpkg.com\/leaflet@1.9.4\/dist\/leaflet.js\"><\/script>\n<script>\n(function () {\n  const map = L.map('map-aaccmed', { scrollWheelZoom: true });\n\n  \/\/ === Fond : Esri WorldTopoMap\n  const base = L.tileLayer(\n    'https:\/\/server.arcgisonline.com\/ArcGIS\/rest\/services\/World_Topo_Map\/MapServer\/tile\/{z}\/{y}\/{x}',\n    {\n      maxZoom: 20,\n      attribution: 'Tiles \u00a9 Esri \u2014 Source: Esri, DeLorme, NAVTEQ, USGS, Intermap, iPC, NRCAN, Esri Japan, METI, Esri China (Hong Kong), Esri (Thailand), MapmyIndia, TomTom'\n    }\n  ).addTo(map);\n\n  \/\/ === Donn\u00e9es GeoJSON (exemples)\n  const zoneDisputee = {\n    \"type\":\"Feature\",\"properties\":{\"name\":\"Zone disput\u00e9e\"},\n    \"geometry\":{\"type\":\"Polygon\",\"coordinates\":[[\n      [-12.3,28.6], [-11.2,28.6], [-9.6,27.7], [-9.7,26.0],\n      [-10.7,24.8], [-12.4,24.9], [-12.3,28.6]\n    ]]}\n  };\n\n  const frontiereReconnue = {\n    \"type\":\"Feature\",\"properties\":{\"label\":\"Fronti\u00e8re reconnue\"},\n    \"geometry\":{\"type\":\"LineString\",\"coordinates\":[\n      [-8.68,27.66], [-9.48,27.35], [-10.38,26.88], [-11.00,26.10],\n      [-11.65,25.85], [-12.17,25.65]\n    ]}\n  };\n\n  const frontiereRevendiquee = {\n    \"type\":\"Feature\",\"properties\":{\"label\":\"Fronti\u00e8re revendiqu\u00e9e\"},\n    \"geometry\":{\"type\":\"LineString\",\"coordinates\":[\n      [-8.60,28.10], [-9.30,27.90], [-10.20,27.30], [-11.20,26.60],\n      [-12.10,26.10]\n    ]}\n  };\n\n  \/\/ === Styles\n  const styleZoneTransparent = { color: 'transparent', weight: 0, fillOpacity: 0 };\n  const styleFrontiereReconnue = { color: '#222', weight: 2 };\n\n  \/\/ === Couches\n  const coucheZone = L.geoJSON(zoneDisputee, { style: styleZoneTransparent, interactive: false }).addTo(map);\n  const coucheFR   = L.geoJSON(frontiereReconnue, { style: styleFrontiereReconnue }).addTo(map);\n  const coucheFV   = L.geoJSON(frontiereRevendiquee).addTo(map); \/\/ style par d\u00e9faut (bleu)\n\n  \/\/ === Cadrage initial : M\u00e9diterran\u00e9e\n  map.fitBounds([\n    [30.0, -10.0], \/\/ Sud-Ouest\n    [46.0, 40.0]   \/\/ Nord-Est\n  ]);\n})();\n<\/script>\n\n\n\n\n<!-- Leaflet (CDN) -->\n<link rel=\"stylesheet\" href=\"https:\/\/unpkg.com\/leaflet@1.9.4\/dist\/leaflet.css\" \/>\n<style>\n  #map-aaccmed { height: 620px; width: 100%; }\n  #map-aaccmed { border: 1px solid #e6e6e6; border-radius: 6px; }\n<\/style>\n\n<div id=\"map-aaccmed\" role=\"region\" aria-label=\"Carte AACCMed\"><\/div>\n\n<script src=\"https:\/\/unpkg.com\/leaflet@1.9.4\/dist\/leaflet.js\"><\/script>\n<script>\n(function () {\n  const map = L.map('map-aaccmed', { scrollWheelZoom: true });\n\n  \/\/ === Fond : Esri World Imagery (satellite)\n  const base = L.tileLayer(\n    'https:\/\/server.arcgisonline.com\/ArcGIS\/rest\/services\/World_Imagery\/MapServer\/tile\/{z}\/{y}\/{x}',\n    {\n      maxZoom: 20,\n      attribution: 'Tiles \u00a9 Esri \u2014 Source: Esri, Maxar, Earthstar Geographics, and the GIS User Community'\n    }\n  ).addTo(map);\n\n  \/\/ (Optionnel) labels seuls par-dessus\n  const labels = L.tileLayer(\n    'https:\/\/{s}.basemaps.cartocdn.com\/light_only_labels\/{z}\/{x}\/{y}.png',\n    {\n      maxZoom: 20,\n      attribution: '\u00a9 OpenStreetMap contributors, \u00a9 CARTO'\n    }\n  ).addTo(map);\n\n  \/\/ === Vos donn\u00e9es GeoJSON (exemples; remplacez par vos g\u00e9om\u00e9tries pr\u00e9cises)\n  const zoneDisputee = {\n    \"type\":\"Feature\",\"properties\":{\"name\":\"Zone disput\u00e9e\"},\n    \"geometry\":{\"type\":\"Polygon\",\"coordinates\":[[\n      [-12.3,28.6], [-11.2,28.6], [-9.6,27.7], [-9.7,26.0],\n      [-10.7,24.8], [-12.4,24.9], [-12.3,28.6]\n    ]]}\n  };\n\n  const frontiereReconnue = {\n    \"type\":\"Feature\",\"properties\":{\"label\":\"Fronti\u00e8re reconnue\"},\n    \"geometry\":{\"type\":\"LineString\",\"coordinates\":[\n      [-8.68,27.66], [-9.48,27.35], [-10.38,26.88], [-11.00,26.10],\n      [-11.65,25.85], [-12.17,25.65]\n    ]}\n  };\n\n  const frontiereRevendiquee = {\n    \"type\":\"Feature\",\"properties\":{\"label\":\"Fronti\u00e8re revendiqu\u00e9e\"},\n    \"geometry\":{\"type\":\"LineString\",\"coordinates\":[\n      [-8.60,28.10], [-9.30,27.90], [-10.20,27.30], [-11.20,26.60],\n      [-12.10,26.10]\n    ]}\n  };\n\n  \/\/ === Styles\n  \/\/ Zone disput\u00e9e totalement invisible (ni trait ni remplissage) et non interactive\n  const styleZoneTransparent = { color: 'transparent', weight: 0, fillOpacity: 0 };\n  const styleFrontiereReconnue = { color: '#222', weight: 2 }; \/\/ trait gris fonc\u00e9\n\n  \/\/ === Couches\n  const coucheZone = L.geoJSON(zoneDisputee, { style: styleZoneTransparent, interactive: false }).addTo(map);\n  const coucheFR   = L.geoJSON(frontiereReconnue, { style: styleFrontiereReconnue }).addTo(map);\n  const coucheFV   = L.geoJSON(frontiereRevendiquee).addTo(map); \/\/ style par d\u00e9faut (bleu)\n\n  \/\/ === Cadrage initial : M\u00e9diterran\u00e9e (comme la capture)\n  \/\/ SW: [lat, lon] = [30.0, -10.0] ; NE: [46.0, 40.0]\n  map.fitBounds([\n    [30.0, -10.0],\n    [46.0, 40.0]\n  ]);\n\n  \/\/ (Optionnel) Limiter la navigation \u00e0 cette zone :\n  \/\/ map.setMaxBounds([[25, -20], [50, 50]]);\n  \/\/ map.on('drag', function() { map.panInsideBounds(map.getBounds(), { animate: false }); });\n\n})();\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":4,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"class_list":["post-34329","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/fondation-farm.org\/en\/wp-json\/wp\/v2\/pages\/34329","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fondation-farm.org\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/fondation-farm.org\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/fondation-farm.org\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/fondation-farm.org\/en\/wp-json\/wp\/v2\/comments?post=34329"}],"version-history":[{"count":7,"href":"https:\/\/fondation-farm.org\/en\/wp-json\/wp\/v2\/pages\/34329\/revisions"}],"predecessor-version":[{"id":34338,"href":"https:\/\/fondation-farm.org\/en\/wp-json\/wp\/v2\/pages\/34329\/revisions\/34338"}],"wp:attachment":[{"href":"https:\/\/fondation-farm.org\/en\/wp-json\/wp\/v2\/media?parent=34329"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}