Skip to content

Commit

Permalink
Merge branch 'dev' - MEP pour les 5-11 ans + nouvelle source de donné…
Browse files Browse the repository at this point in the history
…es pour la page centres
  • Loading branch information
fcamblor committed Dec 22, 2021
2 parents 1f21ba4 + 710fea7 commit 41a1ad4
Show file tree
Hide file tree
Showing 106 changed files with 35,890 additions and 143 deletions.
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ <h2 class="h5">Quels sont les différents types de vaccins contre le coronavirus
<h2 class="h1">Carte des centres de vaccination contre la Covid-19</h2>

<p>
Il y a en France plus de 2&nbsp;500 centres ou lieux de vaccination contre la Covid-19. Ces centres peuvent être des vaccinodromes,
Il y a en France plus de 5&nbsp;800 centres ou lieux de vaccination contre la Covid-19. Ces centres peuvent être des vaccinodromes,
des espaces publics, des pharmacies, des cabinets médicaux ou tout autre espace proposé par un professionnel de santé.
Ils sont répartis sur l’ensemble du territoire.
</p>
Expand All @@ -197,8 +197,8 @@ <h3>Prendre rendez-vous pour se faire vacciner</h3>
</p>

<p>
Les données affichées sur cette carte proviennent du Ministère des Solidarités et de la Santé. La carte est actualisée plusieurs fois par jour
afin de vous proposer les informations les plus précises possibles.
Les données affichées sur cette carte proviennent des différentes plateformes que nous interrogeons. La carte est actualisée plusieurs fois par jour
afin de vous proposer les informations les plus précises et à jour possibles.
</p>
</div>

Expand Down
402 changes: 402 additions & 0 deletions public/sitemaps/sitemap-01.xml

Large diffs are not rendered by default.

802 changes: 802 additions & 0 deletions public/sitemaps/sitemap-02.xml

Large diffs are not rendered by default.

321 changes: 321 additions & 0 deletions public/sitemaps/sitemap-03.xml

Large diffs are not rendered by default.

201 changes: 201 additions & 0 deletions public/sitemaps/sitemap-04.xml

Large diffs are not rendered by default.

163 changes: 163 additions & 0 deletions public/sitemaps/sitemap-05.xml

Large diffs are not rendered by default.

170 changes: 170 additions & 0 deletions public/sitemaps/sitemap-06.xml

Large diffs are not rendered by default.

363 changes: 363 additions & 0 deletions public/sitemaps/sitemap-07.xml

Large diffs are not rendered by default.

457 changes: 457 additions & 0 deletions public/sitemaps/sitemap-08.xml

Large diffs are not rendered by default.

339 changes: 339 additions & 0 deletions public/sitemaps/sitemap-09.xml

Large diffs are not rendered by default.

433 changes: 433 additions & 0 deletions public/sitemaps/sitemap-10.xml

Large diffs are not rendered by default.

435 changes: 435 additions & 0 deletions public/sitemaps/sitemap-11.xml

Large diffs are not rendered by default.

348 changes: 348 additions & 0 deletions public/sitemaps/sitemap-12.xml

Large diffs are not rendered by default.

151 changes: 151 additions & 0 deletions public/sitemaps/sitemap-13.xml

Large diffs are not rendered by default.

550 changes: 550 additions & 0 deletions public/sitemaps/sitemap-14.xml

Large diffs are not rendered by default.

260 changes: 260 additions & 0 deletions public/sitemaps/sitemap-15.xml

Large diffs are not rendered by default.

369 changes: 369 additions & 0 deletions public/sitemaps/sitemap-16.xml

Large diffs are not rendered by default.

472 changes: 472 additions & 0 deletions public/sitemaps/sitemap-17.xml

Large diffs are not rendered by default.

292 changes: 292 additions & 0 deletions public/sitemaps/sitemap-18.xml

Large diffs are not rendered by default.

282 changes: 282 additions & 0 deletions public/sitemaps/sitemap-19.xml

Large diffs are not rendered by default.

702 changes: 702 additions & 0 deletions public/sitemaps/sitemap-21.xml

Large diffs are not rendered by default.

350 changes: 350 additions & 0 deletions public/sitemaps/sitemap-22.xml

Large diffs are not rendered by default.

257 changes: 257 additions & 0 deletions public/sitemaps/sitemap-23.xml

Large diffs are not rendered by default.

517 changes: 517 additions & 0 deletions public/sitemaps/sitemap-24.xml

Large diffs are not rendered by default.

579 changes: 579 additions & 0 deletions public/sitemaps/sitemap-25.xml

Large diffs are not rendered by default.

365 changes: 365 additions & 0 deletions public/sitemaps/sitemap-26.xml

Large diffs are not rendered by default.

607 changes: 607 additions & 0 deletions public/sitemaps/sitemap-27.xml

Large diffs are not rendered by default.

371 changes: 371 additions & 0 deletions public/sitemaps/sitemap-28.xml

Large diffs are not rendered by default.

282 changes: 282 additions & 0 deletions public/sitemaps/sitemap-29.xml

Large diffs are not rendered by default.

150 changes: 150 additions & 0 deletions public/sitemaps/sitemap-2A.xml

Large diffs are not rendered by default.

243 changes: 243 additions & 0 deletions public/sitemaps/sitemap-2B.xml

Large diffs are not rendered by default.

360 changes: 360 additions & 0 deletions public/sitemaps/sitemap-30.xml

Large diffs are not rendered by default.

594 changes: 594 additions & 0 deletions public/sitemaps/sitemap-31.xml

Large diffs are not rendered by default.

462 changes: 462 additions & 0 deletions public/sitemaps/sitemap-32.xml

Large diffs are not rendered by default.

547 changes: 547 additions & 0 deletions public/sitemaps/sitemap-33.xml

Large diffs are not rendered by default.

354 changes: 354 additions & 0 deletions public/sitemaps/sitemap-34.xml

Large diffs are not rendered by default.

339 changes: 339 additions & 0 deletions public/sitemaps/sitemap-35.xml

Large diffs are not rendered by default.

243 changes: 243 additions & 0 deletions public/sitemaps/sitemap-36.xml

Large diffs are not rendered by default.

279 changes: 279 additions & 0 deletions public/sitemaps/sitemap-37.xml

Large diffs are not rendered by default.

525 changes: 525 additions & 0 deletions public/sitemaps/sitemap-38.xml

Large diffs are not rendered by default.

512 changes: 512 additions & 0 deletions public/sitemaps/sitemap-39.xml

Large diffs are not rendered by default.

328 changes: 328 additions & 0 deletions public/sitemaps/sitemap-40.xml

Large diffs are not rendered by default.

271 changes: 271 additions & 0 deletions public/sitemaps/sitemap-41.xml

Large diffs are not rendered by default.

329 changes: 329 additions & 0 deletions public/sitemaps/sitemap-42.xml

Large diffs are not rendered by default.

264 changes: 264 additions & 0 deletions public/sitemaps/sitemap-43.xml

Large diffs are not rendered by default.

212 changes: 212 additions & 0 deletions public/sitemaps/sitemap-44.xml

Large diffs are not rendered by default.

329 changes: 329 additions & 0 deletions public/sitemaps/sitemap-45.xml

Large diffs are not rendered by default.

316 changes: 316 additions & 0 deletions public/sitemaps/sitemap-46.xml

Large diffs are not rendered by default.

320 changes: 320 additions & 0 deletions public/sitemaps/sitemap-47.xml

Large diffs are not rendered by default.

165 changes: 165 additions & 0 deletions public/sitemaps/sitemap-48.xml

Large diffs are not rendered by default.

217 changes: 217 additions & 0 deletions public/sitemaps/sitemap-49.xml

Large diffs are not rendered by default.

469 changes: 469 additions & 0 deletions public/sitemaps/sitemap-50.xml

Large diffs are not rendered by default.

617 changes: 617 additions & 0 deletions public/sitemaps/sitemap-51.xml

Large diffs are not rendered by default.

432 changes: 432 additions & 0 deletions public/sitemaps/sitemap-52.xml

Large diffs are not rendered by default.

245 changes: 245 additions & 0 deletions public/sitemaps/sitemap-53.xml

Large diffs are not rendered by default.

597 changes: 597 additions & 0 deletions public/sitemaps/sitemap-54.xml

Large diffs are not rendered by default.

501 changes: 501 additions & 0 deletions public/sitemaps/sitemap-55.xml

Large diffs are not rendered by default.

253 changes: 253 additions & 0 deletions public/sitemaps/sitemap-56.xml

Large diffs are not rendered by default.

733 changes: 733 additions & 0 deletions public/sitemaps/sitemap-57.xml

Large diffs are not rendered by default.

310 changes: 310 additions & 0 deletions public/sitemaps/sitemap-58.xml

Large diffs are not rendered by default.

667 changes: 667 additions & 0 deletions public/sitemaps/sitemap-59.xml

Large diffs are not rendered by default.

689 changes: 689 additions & 0 deletions public/sitemaps/sitemap-60.xml

Large diffs are not rendered by default.

403 changes: 403 additions & 0 deletions public/sitemaps/sitemap-61.xml

Large diffs are not rendered by default.

892 changes: 892 additions & 0 deletions public/sitemaps/sitemap-62.xml

Large diffs are not rendered by default.

467 changes: 467 additions & 0 deletions public/sitemaps/sitemap-63.xml

Large diffs are not rendered by default.

548 changes: 548 additions & 0 deletions public/sitemaps/sitemap-64.xml

Large diffs are not rendered by default.

471 changes: 471 additions & 0 deletions public/sitemaps/sitemap-65.xml

Large diffs are not rendered by default.

228 changes: 228 additions & 0 deletions public/sitemaps/sitemap-66.xml

Large diffs are not rendered by default.

532 changes: 532 additions & 0 deletions public/sitemaps/sitemap-67.xml

Large diffs are not rendered by default.

376 changes: 376 additions & 0 deletions public/sitemaps/sitemap-68.xml

Large diffs are not rendered by default.

280 changes: 280 additions & 0 deletions public/sitemaps/sitemap-69.xml

Large diffs are not rendered by default.

543 changes: 543 additions & 0 deletions public/sitemaps/sitemap-70.xml

Large diffs are not rendered by default.

572 changes: 572 additions & 0 deletions public/sitemaps/sitemap-71.xml

Large diffs are not rendered by default.

358 changes: 358 additions & 0 deletions public/sitemaps/sitemap-72.xml

Large diffs are not rendered by default.

279 changes: 279 additions & 0 deletions public/sitemaps/sitemap-73.xml

Large diffs are not rendered by default.

292 changes: 292 additions & 0 deletions public/sitemaps/sitemap-74.xml

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions public/sitemaps/sitemap-75.xml

Large diffs are not rendered by default.

725 changes: 725 additions & 0 deletions public/sitemaps/sitemap-76.xml

Large diffs are not rendered by default.

508 changes: 508 additions & 0 deletions public/sitemaps/sitemap-77.xml

Large diffs are not rendered by default.

276 changes: 276 additions & 0 deletions public/sitemaps/sitemap-78.xml

Large diffs are not rendered by default.

267 changes: 267 additions & 0 deletions public/sitemaps/sitemap-79.xml

Large diffs are not rendered by default.

776 changes: 776 additions & 0 deletions public/sitemaps/sitemap-80.xml

Large diffs are not rendered by default.

327 changes: 327 additions & 0 deletions public/sitemaps/sitemap-81.xml

Large diffs are not rendered by default.

196 changes: 196 additions & 0 deletions public/sitemaps/sitemap-82.xml

Large diffs are not rendered by default.

163 changes: 163 additions & 0 deletions public/sitemaps/sitemap-83.xml

Large diffs are not rendered by default.

153 changes: 153 additions & 0 deletions public/sitemaps/sitemap-84.xml

Large diffs are not rendered by default.

263 changes: 263 additions & 0 deletions public/sitemaps/sitemap-85.xml

Large diffs are not rendered by default.

277 changes: 277 additions & 0 deletions public/sitemaps/sitemap-86.xml

Large diffs are not rendered by default.

200 changes: 200 additions & 0 deletions public/sitemaps/sitemap-87.xml

Large diffs are not rendered by default.

509 changes: 509 additions & 0 deletions public/sitemaps/sitemap-88.xml

Large diffs are not rendered by default.

427 changes: 427 additions & 0 deletions public/sitemaps/sitemap-89.xml

Large diffs are not rendered by default.

102 changes: 102 additions & 0 deletions public/sitemaps/sitemap-90.xml

Large diffs are not rendered by default.

196 changes: 196 additions & 0 deletions public/sitemaps/sitemap-91.xml

Large diffs are not rendered by default.

41 changes: 41 additions & 0 deletions public/sitemaps/sitemap-92.xml

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions public/sitemaps/sitemap-93.xml

Large diffs are not rendered by default.

50 changes: 50 additions & 0 deletions public/sitemaps/sitemap-94.xml

Large diffs are not rendered by default.

192 changes: 192 additions & 0 deletions public/sitemaps/sitemap-95.xml

Large diffs are not rendered by default.

33 changes: 33 additions & 0 deletions public/sitemaps/sitemap-971.xml

Large diffs are not rendered by default.

37 changes: 37 additions & 0 deletions public/sitemaps/sitemap-972.xml

Large diffs are not rendered by default.

23 changes: 23 additions & 0 deletions public/sitemaps/sitemap-973.xml

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions public/sitemaps/sitemap-974.xml

Large diffs are not rendered by default.

18 changes: 18 additions & 0 deletions public/sitemaps/sitemap-976.xml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/routing/DynamicURLs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {Strings} from "../utils/Strings";
export const rechercheDepartementDescriptor = {
routerUrl: '/centres-vaccination-covid-dpt:codeDpt-:nomDpt/recherche-:typeRecherche',
urlGenerator: ({codeDepartement, nomDepartement}: {codeDepartement: string, nomDepartement: string}) => {
return ['standard', /* '18_55' */, 'dose_rappel', 'dose_1_ou_2'].map(typeRecherche => {
return ['standard', /* '18_55' */, 'dose_rappel', 'dose_1_enfants', 'dose_1_ou_2'].map(typeRecherche => {
return `/centres-vaccination-covid-dpt${codeDepartement}-${Strings.toReadableURLPathValue(nomDepartement)}/recherche-${typeRecherche}`;
});
}
Expand All @@ -13,7 +13,7 @@ export const rechercheDepartementDescriptor = {
export const rechercheCommuneDescriptor = {
routerUrl: '/centres-vaccination-covid-dpt:codeDpt-:nomDpt/commune:codeCommune-:codePostal-:nomCommune/recherche-:typeRecherche/en-triant-par-:codeTriCentre',
urlGenerator: ({codeDepartement, nomDepartement, codeCommune, codePostal, nomCommune, tri}: {codeDepartement: string, nomDepartement: string, codeCommune: string, codePostal: string, nomCommune: string, tri: CodeTriCentre}) => {
return ['standard', /* '18_55' */, 'dose_rappel', 'dose_1_ou_2'].map(typeRecherche => {
return ['standard', /* '18_55' */, 'dose_rappel', 'dose_1_enfants', 'dose_1_ou_2'].map(typeRecherche => {
return `/centres-vaccination-covid-dpt${codeDepartement}-${Strings.toReadableURLPathValue(nomDepartement)}/commune${codeCommune}-${codePostal}-${Strings.toReadableURLPathValue(nomCommune)}/recherche-${typeRecherche}/en-triant-par-${tri}`;
})
}
Expand Down
21 changes: 19 additions & 2 deletions src/state/State.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ function transformLieu(rawLieu: any): Lieu {

export type Coordinates = { latitude: number, longitude: number }
export type Location = Coordinates & {city: string, cp: string}
export type TagCreneau = /*"preco18_55"|*/"all"|"first_or_second_dose"|"third_dose";
export type TagCreneau = /*"preco18_55"|*/"all"|"first_or_second_dose"|"third_dose"|"kids_first_dose";
export type StatsCreneauxQuotidienParTag = {
tag: TagCreneau;
creneaux: number;
Expand Down Expand Up @@ -293,7 +293,7 @@ export const VACCINE_CATEGORIES: VaccineCategory[] = [
];
*/

export type SearchType = "standard" /*| "18_55"|*/ |"dose_rappel"|"dose_1_ou_2";
export type SearchType = "standard" /*| "18_55"|*/ |"dose_rappel"|"dose_1_ou_2"|"dose_1_enfants";
export const TYPE_RECHERCHE_PAR_DEFAUT: SearchType = "dose_rappel";

export type SearchTypeConfig = {
Expand Down Expand Up @@ -383,6 +383,23 @@ const SEARCH_TYPE_CONFIGS: {[type in SearchType]: SearchTypeConfig & {type: type
searchResultsByDepartement: 'search_results_by_department_first_or_second_shot',
searchResultsByCity: 'search_results_by_city_first_or_second_shot'
}
},
'dose_1_enfants': {
type: 'dose_1_enfants',
tagCreneau: 'kids_first_dose',
cardAppointmentsExtractor: (lieu, daySelectorDisponible, creneauxParLieux) => daySelectorDisponible
?creneauxParLieux.find(cpl => cpl.lieu === lieu.internal_id)?.creneaux || 0
:lieu.appointment_count,
lieuConsidereCommeDisponible: (lieu, creneauxParLieu) => lieu.appointment_by_phone_only || (creneauxParLieu?.creneaux || 0) > 0,
pathParam: 'dose_1_enfants',
standardTabSelected: true,
excludeAppointmentByPhoneOnly: false,
jourSelectionnable: true,
theme: 'standard',
analytics: {
searchResultsByDepartement: 'search_results_by_department_first_kids_shot',
searchResultsByCity: 'search_results_by_city_first_kids_shot'
}
}
};
export function searchTypeConfigFromPathParam(pathParams: Record<string,string>): SearchTypeConfig & {type: SearchType} {
Expand Down
180 changes: 46 additions & 134 deletions src/views/vmd-lieux.view.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
import {css, customElement, html, LitElement, unsafeCSS} from 'lit-element';
import {Icon, map, marker, tileLayer} from 'leaflet'
import {Icon, LatLngTuple, map, Marker, marker, tileLayer} from 'leaflet'
import leafletCss from 'leaflet/dist/leaflet.css';
import leafletMarkerCss from 'leaflet.markercluster/dist/MarkerCluster.Default.css';
// @ts-ignore
import {MarkerClusterGroup} from 'leaflet.markercluster'
import {Router} from "../routing/Router";
import {CSS_Global} from "../styles/ConstructibleStyleSheets";
import {State} from "../state/State";

// Code imported (and refactored a little bit)
// from https://github.com/rozierguillaume/covidtracker-tools/blob/main/src/ViteMaDose/carteCentres.html

type Lieu = {
type LieuCarte = {
nom: string;
longitude: number;
latitude: number;
reservation: string;
date_ouverture: string;
rdv_tel: string;
modalites: string;
adresse: string;
maj: string;
date_ouverture: string|undefined;
rdv_tel: string|undefined;
modalites: string|undefined;
adresse: string|undefined;
maj: string|undefined;
};

@customElement('vmd-lieux')
Expand Down Expand Up @@ -51,132 +52,40 @@ export class VmdLieuxView extends LitElement {
this.requestUpdate().then(() => this.loadMap());
}

private loadMap() {
const mymap = map(this.shadowRoot!.querySelector("#mapid") as HTMLElement).setView([46.505, 3], 6);
const url="https://www.data.gouv.fr/fr/datasets/r/5cb21a85-b0b0-4a65-a249-806a040ec372"

fetch(url)
.then(response => response.arrayBuffer())
.then(buffer => {
const decoder = new TextDecoder();
const csv = decoder.decode(buffer);
const data_array = VmdLieuxView.CSVToArray(csv, ";");

const lieux: Lieu[] = data_array.slice(1, data_array.length-1).map((value: string[]) => ({
longitude: Number(value[10]),
latitude: Number(value[11]),
nom: value[1],
reservation: (!value[34])?"":value[34].replace("partners.doctolib.fr", "www.doctolib.fr"),
date_ouverture: value[33],
rdv_tel: value[35],
modalites: value[37],
adresse: value[5] + " " + value[6] + ", " + value[7] + " " + value[9],
maj: value[22].slice(0, 16),
}))

const markers = VmdLieuxView.creer_pins(lieux);
mymap.addLayer(markers);
})
.catch(function () {
// this.dataError = true;
console.log("error1")
});
private async loadMap() {
const mymap = map(this.shadowRoot!.querySelector("#mapid") as HTMLElement, {

}).setView([46.505, 3], 6);

const departements = await State.current.departementsDisponibles();
const resultatsRechercheLieux = await State.current.lieuxPour(departements.map(d => d.code_departement).filter(code => code !== 'om'));
const lieuxCarte = resultatsRechercheLieux.lieuxDisponibles.concat(resultatsRechercheLieux.lieuxIndisponibles)
.filter(lieu => !!lieu.location && !!lieu.location.longitude && lieu.location.latitude)
// We have some location which have silly locations, like longitude=6786471059425410 (missing comma)
.filter(lieu => lieu.location.latitude >= -90 && lieu.location.latitude <= 90 && lieu.location.longitude >= -180 && lieu.location.longitude <= 180)
.map<LieuCarte>(lieu => ({
nom: lieu.nom,
longitude: lieu.location.longitude,
latitude: lieu.location.latitude,
reservation: lieu.url,
date_ouverture: undefined,
rdv_tel: lieu?.metadata?.phone_number,
modalites: undefined,
adresse: lieu?.metadata?.address,
maj: undefined,
}));

tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 19,
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(mymap);
}

// ref: http://stackoverflow.com/a/1293163/2343
// This will parse a delimited string into an array of
// arrays. The default delimiter is the comma, but this
// can be overriden in the second argument.
private static CSVToArray(strData: string, strDelimiter: string ): string[][]{
// Check to see if the delimiter is defined. If not,
// then default to comma.
strDelimiter = (strDelimiter || ",");

// Create a regular expression to parse the CSV values.
let objPattern = new RegExp(
(
// Delimiters.
"(\\" + strDelimiter + "|\\r?\\n|\\r|^)" +

// Quoted fields.
"(?:\"([^\"]*(?:\"\"[^\"]*)*)\"|" +

// Standard fields.
"([^\"\\" + strDelimiter + "\\r\\n]*))"
),
"gi"
);


// Create an array to hold our data. Give the array
// a default empty first row.
let arrData = [[]] as string[][];

// Create an array to hold our individual pattern
// matching groups.
let arrMatches = null;


// Keep looping over the regular expression matches
// until we can no longer find a match.
while (arrMatches = objPattern.exec( strData )){

// Get the delimiter that was found.
let strMatchedDelimiter = arrMatches[ 1 ];

// Check to see if the given delimiter has a length
// (is not the start of string) and if it matches
// field delimiter. If id does not, then we know
// that this delimiter is a row delimiter.
if (
strMatchedDelimiter.length &&
strMatchedDelimiter !== strDelimiter
){

// Since we have reached a new row of data,
// add an empty row to our data array.
arrData.push( [] );

}

let strMatchedValue;

// Now that we have our delimiter out of the way,
// let's check to see which kind of value we
// captured (quoted or unquoted).
if (arrMatches[ 2 ]){

// We found a quoted value. When we capture
// this value, unescape any double quotes.
strMatchedValue = arrMatches[ 2 ].replace(
new RegExp( "\"\"", "g" ),
"\""
);

} else {

// We found a non-quoted value.
strMatchedValue = arrMatches[ 3 ];

}


// Now that we have our value string, let's add
// it to the data array.
arrData[ arrData.length - 1 ].push( strMatchedValue );
}

// Return the parsed data.
return arrData;
const markers = VmdLieuxView.creer_pins(lieuxCarte);
mymap.addLayer(markers);
}

private static creer_pins(lieux: Lieu[]){
const markers = lieux.reduce((markers: MarkerClusterGroup, lieu) => {
private static creer_pins(lieux: LieuCarte[]){
const markers = lieux.reduce((markers, lieu) => {
let reservation_str = ""
if (typeof lieu.reservation != 'undefined'){
if (lieu.reservation.indexOf("http") === 0){
Expand All @@ -189,26 +98,29 @@ export class VmdLieuxView extends LitElement {
const string_popup = `
<span style='font-size: 150%;'>${lieu.nom}</span>
<br>
<b>Adresse :</b> ${lieu.adresse}<br><b>Réservation :</b> ${reservation_str}
<br>
<b>Tél :</b> <a href:'tel:${lieu.rdv_tel}'>${lieu.rdv_tel}</a>
<b>Adresse :</b> ${lieu.adresse || "-"}
<br>
<b>Date d'ouverture :</b> ${lieu.date_ouverture}<br><b>Modalités :</b> ${lieu.modalites}
<b>Réservation :</b> ${reservation_str || "-"}
<br>
<b>Mise à jour :</b> ${lieu.maj}
<b>Tél :</b> ${lieu.rdv_tel?`<a href='tel:${lieu.rdv_tel}'>${lieu.rdv_tel}</a>`:`-`}
`;
const newMarker = marker([lieu.longitude, lieu.latitude], {
const newMarker = marker([lieu.latitude, lieu.longitude] as LatLngTuple, {
icon: new Icon.Default({imagePath: `${Router.basePath}assets/images/png/`})
}).bindPopup(string_popup) //.addTo(this.mymap);
newMarker.on('click', function() {
// @ts-ignore
this.openPopup();
});
markers.addLayer(newMarker);

markers.push(newMarker);
return markers;
}, new MarkerClusterGroup({ disableClusteringAtZoom: 9 }));
return markers;
}, [] as Marker[]);

const markersGroup = new MarkerClusterGroup({
disableClusteringAtZoom: 9, chunkedLoading: true,
})
markersGroup.addLayers(markers, true);
return markersGroup;
}

disconnectedCallback() {
Expand Down
4 changes: 2 additions & 2 deletions src/views/vmd-rdv.view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,8 @@ export abstract class AbstractVmdRdvView extends LitElement {
</label>
<div class="col">
<vmd-button-switch class="mb-3" style="display: inline-block"
codeSelectionne="dose_rappel"
.options="${[{code: 'dose_rappel', libelle: 'Une dose de rappel'}, {code: 'dose_1_ou_2', libelle: 'Une 1ère dose de vaccin'}]}"
codeSelectionne="${this.currentSearch?.type || 'dose_rappel'}"
.options="${[{code: 'dose_rappel', libelle: 'Une dose de rappel'}, {code: 'dose_1_enfants', libelle: 'Une dose pour 5-11 ans'}, {code: 'dose_1_ou_2', libelle: 'Une 1ère dose de vaccin'}]}"
@changed="${(e: CustomEvent<{value: SearchType}>) => this.updateSearchTypeTo(e.detail.value)}">
</vmd-button-switch>
</div>
Expand Down

0 comments on commit 41a1ad4

Please sign in to comment.