loading
equals trueUsage :
<Spinner spin={loading}></Spinner>
data
GeoJson paramUsage with popup :
<div class="map-container">
<Maplibre>
<MaplibreSource name="data" data={$geojson}>
<MaplibreStyleLayer name="datastyle">
<MaplibrePopup>
<h3 style="margin-top: 6px">!%- insnom %!</h3>
<p>!%- comlib %!</p>
<ul>
<li>!%- equipementtypelib %!</li>
<li>!%- famille_type_d_equipement %!</li>
</ul>
</MaplibrePopup>
</MaplibreStyleLayer>
</MaplibreSource>
</Maplibre>
</div>
Usage with click handler on features :
<div class="map-container">
<Maplibre>
<MaplibreSource name="data" data={$geojson}>
<MaplibreStyleLayer name="datastyle">
<MaplibreFeaturesEvent on:click={clickOnFeatures}></MaplibreFeaturesEvent>
</MaplibreStyleLayer>
</MaplibreSource>
</Maplibre>
</div>
Usage :
<div class="map-container">
<OLMap>
<!-- View -->
<OLMapView initialCenterLonLat={[2.0, 48.0]} initialZoom="6"></OLMapView>
<!-- Basemaps -->
<OLMapboxStyleLayer title="Jawg light" style={jawgstyle}/>
<OLMapTileLayer title="OSM default"></OLMapTileLayer>
<OLMapTileLayer title="ESRI" source={esri_basemap_url}/>
<OLLayerSwitcher/>
<!-- Data -->
<OLDataLayer data={geojson}></OLDataLayer>
<!-- Popup -->
<OLOverlay title="equnom"/>
</OLMap>
</div>
<script>
let data = new DatasetStore("mydomain", "mydataset");
let records = data.getRecordsStore();
let facet = data.getFacetStore("myfacetid");
let geojson = data.getGeojsonExport();
</script>
<div>
{#each $data as record}
{record}
{/each}
{JSON.stringify($facet)}
</div>
Usage :
<script>
let routing = new IGNGeoportailRouting();
let dist = routing.getRouting();
routing.setStart([2, 48]);
routing.setEnd([3, 50]);
</script>
<div>
{#if $dist.duration}
<h4>Routing :</h4>
<p>{$dist.duration.toLocaleString()} {$dist.timeUnit}</p>
<p>{$dist.distance.toLocaleString()} {$dist.distanceUnit}</p>
<button on:click={() => {routing.resetEnd()}}>Clear routing</button>
{/if}
</div>