Examples
Path Layer (deck.gl)
Render continuous paths with multiple vertices for routes and trajectories.
Installation
$ npx shadcn-vue@latest add https://mapcn-vue.geoql.in/r/map-deckgl-coreUsage
<script setup lang="ts">
import { VMap, VControlNavigation } from '@geoql/v-maplibre';
import { VLayerDeckglPath } from '@geoql/v-maplibre/deck.gl';
const mapOptions = {
style: 'https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json',
center: [-122.4, 37.8],
zoom: 11,
};
const pathData = [
{
path: [[-122.45, 37.78], [-122.43, 37.79], [-122.41, 37.78], [-122.39, 37.8]],
name: 'Route A',
color: [255, 140, 0],
},
// ... more paths
];
</script>
<template>
<VMap :options="mapOptions" class="h-125 w-full">
<VControlNavigation position="top-right" />
<VLayerDeckglPath
id="path-layer"
:data="pathData"
:get-path="(d) => d.path"
:get-color="(d) => d.color"
:get-width="4"
:width-min-pixels="2"
:pickable="true"
:rounded="true"
/>
</VMap>
</template> Components 3
<VMap />@geoql/v-maplibre<VControlNavigation />@geoql/v-maplibre<VLayerDeckglPath />@geoql/v-maplibre/deck.gl