feat: Ajout des données P4Pillon
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
db020a2e78
commit
05126f8458
|
@ -27,7 +27,7 @@
|
||||||
|
|
||||||
|
|
||||||
<div id="map" style="width: 100%; height: 100%;"></div>
|
<div id="map" style="width: 100%; height: 100%;"></div>
|
||||||
<script>
|
<script type="module">
|
||||||
var mappos = L.Permalink.getMapLocation();
|
var mappos = L.Permalink.getMapLocation();
|
||||||
var map = L.map('map').setView(mappos.center || [46.55886, 3.21924], mappos.zoom || 6);
|
var map = L.map('map').setView(mappos.center || [46.55886, 3.21924], mappos.zoom || 6);
|
||||||
L.Permalink.setup(map);
|
L.Permalink.setup(map);
|
||||||
|
@ -43,30 +43,52 @@
|
||||||
name: 1,
|
name: 1,
|
||||||
name_long: 2,
|
name_long: 2,
|
||||||
dep: 3,
|
dep: 3,
|
||||||
tel: 4,
|
adresse: 4,
|
||||||
siret: 5,
|
tel: 5,
|
||||||
x: 6,
|
siret: 6,
|
||||||
y: 7,
|
x: 7,
|
||||||
|
y: 8,
|
||||||
}
|
}
|
||||||
var json = fetch('./data.json').then(response => {
|
|
||||||
return response.json();
|
async function getDataP4Pillon() {
|
||||||
})
|
const data = await fetch('./data_p4pillon.json')
|
||||||
.then(jsondata => {
|
return data.json()
|
||||||
|
}
|
||||||
|
async function getData() {
|
||||||
|
const data = await fetch('./data.json')
|
||||||
|
return data.json()
|
||||||
|
}
|
||||||
|
function getPopup(msp, dataP4Pillon) {
|
||||||
|
console.log(dataP4Pillon)
|
||||||
|
|
||||||
|
const nom = dataP4Pillon ? dataP4Pillon[0] : (msp[columns.name_long] ? msp[columns.name_long] : msp[columns.name])
|
||||||
|
const dep = msp[columns.dep]
|
||||||
|
const adresse = msp[columns.adresse]
|
||||||
|
|
||||||
|
return nom + " (" + dep + ")" +
|
||||||
|
"<br>Établissement FINESS N°" + msp[columns.finessET] +
|
||||||
|
(msp[columns.siret] != null ? "<br>SIREN : <a rel='noreferrer' target='_blank' href='https://data.inpi.fr/entreprises/" + msp[columns.siret].substring(0, 9) + "'>" + msp[columns.siret].substring(0, 9) + "</a>" : "") +
|
||||||
|
(msp[columns.tel] != null ? "<br><a href='tel:" + msp[columns.tel] + "'>" + msp[columns.tel] + "</a>" : "") +
|
||||||
|
(dataP4Pillon ? "<br>" +
|
||||||
|
(dataP4Pillon[1] || dataP4Pillon[2] ? "<br>Leader : " + dataP4Pillon[1] + " " + dataP4Pillon[2] : "") +
|
||||||
|
(dataP4Pillon[3] ? "<br>Adhérent à l'association AVEC Santé : ✅" : "") +
|
||||||
|
(dataP4Pillon[4] ? "<br>Accord conventionnel interprofessionnel : ✅" : "")
|
||||||
|
: "")
|
||||||
|
}
|
||||||
|
|
||||||
|
var data = await getData()
|
||||||
|
var dataP4Pillon = await getDataP4Pillon()
|
||||||
var markersCluster = new L.MarkerClusterGroup();
|
var markersCluster = new L.MarkerClusterGroup();
|
||||||
for (const msp of jsondata) {
|
|
||||||
|
for (const msp of data) {
|
||||||
const marker = L
|
const marker = L
|
||||||
.marker([msp[columns.x], msp[columns.y]])
|
.marker([msp[columns.x], msp[columns.y]])
|
||||||
.bindPopup(
|
.bindPopup(
|
||||||
(msp[columns.name_long] ? msp[columns.name_long] : msp[columns.name]) + " (" + msp[columns.dep] + ")<br>" +
|
getPopup(msp, dataP4Pillon[msp[columns.finessET]])
|
||||||
"Établissement FINESS N°" + msp[columns.finessET] + "<br>" +
|
|
||||||
(msp[columns.siret] != null ? "SIREN : <a rel='noreferrer' target='_blank' href='https://data.inpi.fr/entreprises/" + msp[columns.siret].substring(0, 9) + "'>" + msp[columns.siret].substring(0, 9) + "</a><br>" : "") +
|
|
||||||
(msp[columns.tel] != null ? "<a href='tel:" + msp[columns.tel] + "'>" + msp[columns.tel] + "</a>" : "")
|
|
||||||
);
|
);
|
||||||
markersCluster.addLayer(marker);
|
markersCluster.addLayer(marker);
|
||||||
}
|
}
|
||||||
map.addLayer(markersCluster);
|
map.addLayer(markersCluster);
|
||||||
});
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -67,7 +67,7 @@ header_drop = [
|
||||||
'commune',
|
'commune',
|
||||||
#'departement',
|
#'departement',
|
||||||
'libdepartement',
|
'libdepartement',
|
||||||
'ligneacheminement',
|
#'ligneacheminement',
|
||||||
#'telephone',
|
#'telephone',
|
||||||
'telecopie',
|
'telecopie',
|
||||||
'categetab',
|
'categetab',
|
||||||
|
|
|
@ -0,0 +1,121 @@
|
||||||
|
{
|
||||||
|
"190012427": [
|
||||||
|
"PSP Millesoins",
|
||||||
|
"Antoine",
|
||||||
|
"PRIOUX",
|
||||||
|
true,
|
||||||
|
true
|
||||||
|
],
|
||||||
|
"190013144": [
|
||||||
|
"Maison de Santé des Eaux Vives",
|
||||||
|
"Anaïs",
|
||||||
|
"CARTEGNIE",
|
||||||
|
true,
|
||||||
|
true
|
||||||
|
],
|
||||||
|
"190013805": [
|
||||||
|
"MSP MANSAC",
|
||||||
|
"Hélène",
|
||||||
|
"SCHWARTZ",
|
||||||
|
false,
|
||||||
|
null
|
||||||
|
],
|
||||||
|
"190012443": [
|
||||||
|
"Pole de santé de Haute-Corrèze",
|
||||||
|
"Cyril",
|
||||||
|
"MOESCH",
|
||||||
|
null,
|
||||||
|
null
|
||||||
|
],
|
||||||
|
"190012294": [
|
||||||
|
"MSP lubersac projet pompadour",
|
||||||
|
"Maryline",
|
||||||
|
"DUMONT",
|
||||||
|
null,
|
||||||
|
true
|
||||||
|
],
|
||||||
|
"190012278": [
|
||||||
|
"MSP du pays acadien",
|
||||||
|
"Benjamin",
|
||||||
|
"LECAVELIER",
|
||||||
|
true,
|
||||||
|
null
|
||||||
|
],
|
||||||
|
"190013466": [
|
||||||
|
"MSP d'Argentat",
|
||||||
|
"Laurent",
|
||||||
|
"MAHE",
|
||||||
|
null,
|
||||||
|
false
|
||||||
|
],
|
||||||
|
"190013441": [
|
||||||
|
"MSP du Sud Corrézien",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
null,
|
||||||
|
true
|
||||||
|
],
|
||||||
|
"190012401": [
|
||||||
|
"MSP de Seilhac",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
null,
|
||||||
|
null
|
||||||
|
],
|
||||||
|
"190013425": [
|
||||||
|
"MSP de Chamberet",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
null,
|
||||||
|
true
|
||||||
|
],
|
||||||
|
"190012468": [
|
||||||
|
"MSP des Gorges de la Dordogne",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
null,
|
||||||
|
null
|
||||||
|
],
|
||||||
|
"190013128": [
|
||||||
|
"MSP des 7 collines",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
true
|
||||||
|
],
|
||||||
|
"190013409": [
|
||||||
|
"MSP d'Arnac Pompadour",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
null,
|
||||||
|
true
|
||||||
|
],
|
||||||
|
"190013169": [
|
||||||
|
"MSP Union des collines",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
null,
|
||||||
|
null
|
||||||
|
],
|
||||||
|
"190013623": [
|
||||||
|
"MSP de Juillac",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
null,
|
||||||
|
true
|
||||||
|
],
|
||||||
|
"190013789": [
|
||||||
|
"MSP Montplaisir",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
null,
|
||||||
|
true
|
||||||
|
],
|
||||||
|
"570028480": [
|
||||||
|
"MSP de St Privat",
|
||||||
|
"",
|
||||||
|
"",
|
||||||
|
null,
|
||||||
|
null
|
||||||
|
]
|
||||||
|
}
|
Loading…
Reference in New Issue