Skip to content

Commit

Permalink
fix: use global imported components πŸš€
Browse files Browse the repository at this point in the history
  • Loading branch information
vinayakkulkarni committed Mar 10, 2024
1 parent ba4ee54 commit 70940f3
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 34 deletions.
4 changes: 0 additions & 4 deletions components/map/layers/Cluster.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,9 @@
} from 'maplibre-gl';
import type { PropType } from 'vue';
import type { ExpenseFeatureCollection } from '~/@types/expense';
import { VLayerMapboxGeojson } from '~/lib/v-mapbox';
export default defineComponent({
name: 'ExpenseCluster',
components: {
VLayerMapboxGeojson,
},
props: {
data: {
type: Object as PropType<ExpenseFeatureCollection>,
Expand Down
4 changes: 0 additions & 4 deletions components/map/layers/Heatmap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,9 @@
} from 'maplibre-gl';
import type { PropType } from 'vue';
import type { ExpenseFeatureCollection } from '~/@types/expense';
import { VLayerMapboxGeojson } from '~/lib/v-mapbox';
export default defineComponent({
name: 'ExpenseHeatmap',
components: {
VLayerMapboxGeojson,
},
props: {
data: {
type: Object as PropType<ExpenseFeatureCollection>,
Expand Down
4 changes: 0 additions & 4 deletions components/map/layers/Marker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,9 @@
ExpenseFeatureCollection,
} from '~/@types/expense';
import type { PopupOptions } from 'maplibre-gl';
import { VMarker } from '~/lib/v-mapbox';
export default defineComponent({
name: 'ExpenseMarker',
components: {
VMarker,
},
props: {
data: {
type: Object as PropType<ExpenseFeatureCollection>,
Expand Down
43 changes: 21 additions & 22 deletions plugins/v-mapbox.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
// Controls
import { VControlAttribution } from '~/lib/v-mapbox';
import { VControlFullscreen } from '~/lib/v-mapbox';
import { VControlGeolocate } from '~/lib/v-mapbox';
import { VControlNavigation } from '~/lib/v-mapbox';
import { VControlScale } from '~/lib/v-mapbox';
// Layers – Deck.gl
import { VLayerDeckArc } from '~/lib/v-mapbox';
import { VLayerDeckGeojson } from '~/lib/v-mapbox';
import {
VControlAttribution,
VControlFullscreen,
VControlGeolocate,
VControlNavigation,
VControlScale,
} from '~/lib/v-mapbox';
// Layers – Mapbox
import { VLayerMapboxCanvas } from '~/lib/v-mapbox';
import { VLayerMapboxGeojson } from '~/lib/v-mapbox';
import { VLayerMapboxImage } from '~/lib/v-mapbox';
import { VLayerMapboxRaster } from '~/lib/v-mapbox';
import { VLayerMapboxVector } from '~/lib/v-mapbox';
import { VLayerMapboxVideo } from '~/lib/v-mapbox';
import {
VLayerMaplibreCanvas,
VLayerMaplibreGeojson,
VLayerMaplibreImage,
VLayerMaplibreRaster,
VLayerMaplibreVector,
VLayerMaplibreVideo,
} from '~/lib/v-mapbox';
// Map
import VMap from '~/lib/v-mapbox';
// Marker
Expand All @@ -29,14 +30,12 @@ export default defineNuxtPlugin((nuxtApp) => {
// Popup
nuxtApp.vueApp.component('VPopup', VPopup);
// Layers
nuxtApp.vueApp.component('VLayerMapboxCanvas', VLayerMapboxCanvas);
nuxtApp.vueApp.component('VLayerMapboxGeojson', VLayerMapboxGeojson);
nuxtApp.vueApp.component('VLayerMapboxImage', VLayerMapboxImage);
nuxtApp.vueApp.component('VLayerMapboxRaster', VLayerMapboxRaster);
nuxtApp.vueApp.component('VLayerMapboxVector', VLayerMapboxVector);
nuxtApp.vueApp.component('VLayerMapboxVideo', VLayerMapboxVideo);
nuxtApp.vueApp.component('VLayerDeckArc', VLayerDeckArc);
nuxtApp.vueApp.component('VLayerDeckGeojson', VLayerDeckGeojson);
nuxtApp.vueApp.component('VLayerMapboxCanvas', VLayerMaplibreCanvas);
nuxtApp.vueApp.component('VLayerMapboxGeojson', VLayerMaplibreGeojson);
nuxtApp.vueApp.component('VLayerMapboxImage', VLayerMaplibreImage);
nuxtApp.vueApp.component('VLayerMapboxRaster', VLayerMaplibreRaster);
nuxtApp.vueApp.component('VLayerMapboxVector', VLayerMaplibreVector);
nuxtApp.vueApp.component('VLayerMapboxVideo', VLayerMaplibreVideo);
// Controls
nuxtApp.vueApp.component('VControlAttribution', VControlAttribution);
nuxtApp.vueApp.component('VControlFullscreen', VControlFullscreen);
Expand Down

0 comments on commit 70940f3

Please sign in to comment.