add div geocoder

This commit is contained in:
Valentin CZERYBA 2023-11-11 19:21:57 +01:00
parent 552da4c577
commit df40e849a2
2 changed files with 5 additions and 2 deletions

View File

@ -11,7 +11,8 @@
<link rel="canonical" href="https://getbootstrap.com/docs/5.2/examples/dashboard/">
<link href="https://api.mapbox.com/mapbox-gl-js/v2.14.1/mapbox-gl.css" rel="stylesheet">
<link rel="stylesheet" href="https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v5.0.0/mapbox-gl-geocoder.css" type="text/css">
<link href="../css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
@ -23,6 +24,7 @@
<link rel="mask-icon" href="https://getbootstrap.com/docs/5.2/assets/img/favicons/safari-pinned-tab.svg" color="#712cf9">
<link rel="icon" href="https://getbootstrap.com/docs/5.2/assets/img/favicons/favicon.ico">
<meta name="theme-color" content="#712cf9">
<script src="https://api.mapbox.com/mapbox-gl-js/v2.14.1/mapbox-gl.js"></script>
<script src="https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-geocoder/v5.0.0/mapbox-gl-geocoder.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
@ -182,6 +184,7 @@
<div class="input-group mb-3">
<span class="input-group-text" id="placeUpdate">Lieu</span>
<input id="placeUpdateInput" type="text" class="form-control" placeholder="Lieu" aria-label="Lieu" aria-describedby="placeUpdate">
<div id="geocoder"></div>
</div>
<div class="input-group mb-3">
<span class="input-group-text" id="start_dateUpdate">Date de début de l'évènement</span>

View File

@ -4,4 +4,4 @@ accessToken: mapboxgl.accessToken,
types: 'country,region,place,postcode,locality,neighborhood'
});
geocoder.addTo('#placeUpdateInput');
geocoder.addTo('#geocoder');