From 0ae96f64761391bb4e40df74973832090e597aaa Mon Sep 17 00:00:00 2001 From: Vinayak Kulkarni <19776877+vinayakkulkarni@users.noreply.github.com> Date: Sat, 1 Jun 2024 22:12:59 +0530 Subject: [PATCH] chore: cleanup --- lib/v-mapbox/constants/events/layer.ts | 2 +- lib/v-mapbox/constants/events/map.ts | 2 +- lib/v-mapbox/constants/events/popup.ts | 2 +- .../attribution/VControlAttribution.vue | 12 +- lib/v-mapbox/controls/attribution/types.ts | 2 +- .../fullscreen/VControlFullscreen.vue | 8 +- lib/v-mapbox/controls/fullscreen/types.ts | 2 +- .../controls/geolocate/VControlGeolocate.vue | 10 +- lib/v-mapbox/controls/geolocate/types.ts | 2 +- .../navigation/VControlNavigation.vue | 2 +- lib/v-mapbox/controls/scale/VControlScale.vue | 8 +- lib/v-mapbox/controls/scale/types.ts | 2 +- .../maplibre/canvas/VLayerMaplibreCanvas.vue | 6 +- .../geojson/VLayerMaplibreGeojson.vue | 68 ++-- .../maplibre/image/VLayerMaplibreImage.vue | 130 ++++---- .../maplibre/raster/VLayerMaplibreRaster.vue | 140 ++++----- .../maplibre/vector/VLayerMaplibreVector.vue | 131 ++++---- .../maplibre/video/VLayerMaplibreVideo.vue | 131 ++++---- lib/v-mapbox/map/VMap.vue | 23 +- lib/v-mapbox/markers/VMarker.vue | 293 +++++++----------- lib/v-mapbox/popups/VPopup.vue | 214 ++++++------- 21 files changed, 543 insertions(+), 647 deletions(-) diff --git a/lib/v-mapbox/constants/events/layer.ts b/lib/v-mapbox/constants/events/layer.ts index ebc2b2ea..d32759c6 100644 --- a/lib/v-mapbox/constants/events/layer.ts +++ b/lib/v-mapbox/constants/events/layer.ts @@ -1,4 +1,4 @@ -import { MapLayerEventType } from 'maplibre-gl'; +import type { MapLayerEventType } from 'maplibre-gl'; export const mapLayerEvents: Array = [ 'click', diff --git a/lib/v-mapbox/constants/events/map.ts b/lib/v-mapbox/constants/events/map.ts index f4fe23da..bccdb3a6 100644 --- a/lib/v-mapbox/constants/events/map.ts +++ b/lib/v-mapbox/constants/events/map.ts @@ -1,4 +1,4 @@ -import { MapEventType } from 'maplibre-gl'; +import type { MapEventType } from 'maplibre-gl'; export const mapEvents: Array = [ 'error', diff --git a/lib/v-mapbox/constants/events/popup.ts b/lib/v-mapbox/constants/events/popup.ts index bee65e34..ac910c95 100644 --- a/lib/v-mapbox/constants/events/popup.ts +++ b/lib/v-mapbox/constants/events/popup.ts @@ -1 +1 @@ -export const popupEvents = ['open', 'close']; +export const popupEvents = ['open', 'close'] as Array<'open' | 'close'>; diff --git a/lib/v-mapbox/controls/attribution/VControlAttribution.vue b/lib/v-mapbox/controls/attribution/VControlAttribution.vue index 26360718..4281eab0 100644 --- a/lib/v-mapbox/controls/attribution/VControlAttribution.vue +++ b/lib/v-mapbox/controls/attribution/VControlAttribution.vue @@ -1,17 +1,17 @@ diff --git a/lib/v-mapbox/controls/attribution/types.ts b/lib/v-mapbox/controls/attribution/types.ts index bdd4dfe1..b7566a2d 100644 --- a/lib/v-mapbox/controls/attribution/types.ts +++ b/lib/v-mapbox/controls/attribution/types.ts @@ -1 +1 @@ -export type { AttributionOptions, ControlPosition } from 'maplibre-gl'; +export type { AttributionControlOptions, ControlPosition } from 'maplibre-gl'; diff --git a/lib/v-mapbox/controls/fullscreen/VControlFullscreen.vue b/lib/v-mapbox/controls/fullscreen/VControlFullscreen.vue index 0a8bfb25..35c79c5d 100644 --- a/lib/v-mapbox/controls/fullscreen/VControlFullscreen.vue +++ b/lib/v-mapbox/controls/fullscreen/VControlFullscreen.vue @@ -1,16 +1,16 @@ - - diff --git a/lib/v-mapbox/controls/scale/types.ts b/lib/v-mapbox/controls/scale/types.ts index fc08d3b3..f17c83b5 100644 --- a/lib/v-mapbox/controls/scale/types.ts +++ b/lib/v-mapbox/controls/scale/types.ts @@ -1 +1 @@ -export type { ControlPosition, ScaleOptions } from 'maplibre-gl'; +export type { ControlPosition, ScaleControlOptions } from 'maplibre-gl'; diff --git a/lib/v-mapbox/layers/maplibre/canvas/VLayerMaplibreCanvas.vue b/lib/v-mapbox/layers/maplibre/canvas/VLayerMaplibreCanvas.vue index ae2fe40a..34bf1f05 100644 --- a/lib/v-mapbox/layers/maplibre/canvas/VLayerMaplibreCanvas.vue +++ b/lib/v-mapbox/layers/maplibre/canvas/VLayerMaplibreCanvas.vue @@ -23,8 +23,8 @@ before: '', }, ); - let map = injectStrict(MapKey); - let loaded: Ref = ref(false); + const map = injectStrict(MapKey); + const loaded: Ref = ref(false); const layer = { ...props.layer, @@ -62,5 +62,5 @@ diff --git a/lib/v-mapbox/layers/maplibre/geojson/VLayerMaplibreGeojson.vue b/lib/v-mapbox/layers/maplibre/geojson/VLayerMaplibreGeojson.vue index 2028fcad..3088da38 100644 --- a/lib/v-mapbox/layers/maplibre/geojson/VLayerMaplibreGeojson.vue +++ b/lib/v-mapbox/layers/maplibre/geojson/VLayerMaplibreGeojson.vue @@ -1,27 +1,57 @@ diff --git a/lib/v-mapbox/layers/maplibre/image/VLayerMaplibreImage.vue b/lib/v-mapbox/layers/maplibre/image/VLayerMaplibreImage.vue index ff4a0b60..f54c45f1 100644 --- a/lib/v-mapbox/layers/maplibre/image/VLayerMaplibreImage.vue +++ b/lib/v-mapbox/layers/maplibre/image/VLayerMaplibreImage.vue @@ -1,88 +1,76 @@ - diff --git a/lib/v-mapbox/layers/maplibre/raster/VLayerMaplibreRaster.vue b/lib/v-mapbox/layers/maplibre/raster/VLayerMaplibreRaster.vue index a7a83773..c9edb0bc 100644 --- a/lib/v-mapbox/layers/maplibre/raster/VLayerMaplibreRaster.vue +++ b/lib/v-mapbox/layers/maplibre/raster/VLayerMaplibreRaster.vue @@ -1,93 +1,83 @@ - diff --git a/lib/v-mapbox/layers/maplibre/vector/VLayerMaplibreVector.vue b/lib/v-mapbox/layers/maplibre/vector/VLayerMaplibreVector.vue index acbef1a3..cdd1f0b7 100644 --- a/lib/v-mapbox/layers/maplibre/vector/VLayerMaplibreVector.vue +++ b/lib/v-mapbox/layers/maplibre/vector/VLayerMaplibreVector.vue @@ -1,88 +1,77 @@ - diff --git a/lib/v-mapbox/layers/maplibre/video/VLayerMaplibreVideo.vue b/lib/v-mapbox/layers/maplibre/video/VLayerMaplibreVideo.vue index 65d3d033..fa8c31bb 100644 --- a/lib/v-mapbox/layers/maplibre/video/VLayerMaplibreVideo.vue +++ b/lib/v-mapbox/layers/maplibre/video/VLayerMaplibreVideo.vue @@ -1,88 +1,77 @@ - diff --git a/lib/v-mapbox/map/VMap.vue b/lib/v-mapbox/map/VMap.vue index 986ca086..e9776fef 100644 --- a/lib/v-mapbox/map/VMap.vue +++ b/lib/v-mapbox/map/VMap.vue @@ -1,13 +1,8 @@ - + +