|
1 | 1 |
|
2 | 2 | ## [12.0.0](https://github.com/MelihAltintas/vue3-openlayers/compare/v11.6.2...v12.0.0) (2025-08-27) |
3 | 3 |
|
4 | | -### Breaking Changes & Improvements |
5 | | - - Full tree-shaking support: you can now import only the modules you need, reducing bundle size. |
6 | | - New import syntax examples: |
7 | | - ```js |
8 | | - // Import a single component |
9 | | - import { OlMap } from "vue3-openlayers/map"; |
10 | | - import { OlTileLayer } from "vue3-openlayers/layers"; |
11 | | - import { OlSourceOSM } from "vue3-openlayers/sources"; |
12 | | - import { OlFullScreenControl } from "vue3-openlayers/controls"; |
13 | | - import { OlStyle } from "vue3-openlayers/styles"; |
14 | | - ``` |
15 | | - - Component renaming for consistency: many components have been renamed to use consistent PascalCase naming. All imports and usage are now case-sensitive. For example: |
16 | | - - `OlSourceOSM` (not `OlSourceOsm`) |
17 | | - - `OlSourceWMTS` (not `OlSourceWmts`) |
18 | | - - `OlLayerSwitcherControl` (not `OlLayerSwitchercontrol`) |
19 | | - - `OlLayerSwitcherImageControl` (not `OlLayerSwitcherimageControl`) |
20 | | - - `OlSourceBingMaps` (not `OlSourceBingmaps`) |
21 | | - - `OlSourceGeoTIFF` (not `OlSourceGeoTiff`) |
22 | | - - `OlSourceTileJSON` (not `OlSourceTileJson`) |
23 | | - - `OlSourceTileWMS` (not `OlSourceTileWms`) |
24 | | - - `OlSourceXYZ` (not `OlSourceXyz`) |
25 | | - - `OlInteractionClusterSelect` (not `OlInteractionClusterselect`) |
26 | | - - `OlInteractionDragBox` (not `OlInteractionDragbox`) |
27 | | - - `OlInteractionDragRotate` (not `OlInteractionDragrotate`) |
28 | | - - `OlInteractionDragRotateAndZoom` (not `OlInteractionDragrotatezoom`) |
29 | | - - And more, please see the release diff using the GitHub release diff. |
30 | | - - Styles are no longer automatically imported. |
31 | | - - How to migrate: |
32 | | - - Update all imports to use the new subpath and PascalCase names. |
33 | | - - Review your code for any case mismatches in component names. |
34 | | - - Import styles from both openlayers and vue3-openlayers packages where appropriate: |
35 | | - ```js |
36 | | - import 'ol/ol.css'; |
37 | | - import 'vue3-openlayers/vue3-openlayers.css'; |
38 | | - ``` |
39 | | - |
40 | | -### Other Changes |
41 | | - - Internal refactoring for better modularity and future maintenance. |
42 | | - - Documentation and examples updated to reflect new import patterns. |
| 4 | +### 🚨 Breaking Changes |
43 | 5 |
|
| 6 | +#### fix(ol-swipe-control): explicitly set `layers` and `rightLayers` |
| 7 | + |
| 8 | +Before, only the second passed layer was added to the right side. Now you can explicitly pass (multiple) layers for the left (or top) using `layers` and for the right (bottom) using `rightLayers`. |
| 9 | + |
| 10 | +With this version `ol-swipe-control`: |
| 11 | +property `layerList` has been removed and splitted into `layers` and `rightLayers`. |
| 12 | +Please pass explicitly `layers` for the left side (or top, depending on the `orientation`) and `rightLayers` for the right side (or bottom, depending on the `orientation`) |
| 13 | + |
| 14 | +#### Tree-Shaking Support & New Import Structure |
| 15 | +- **Full tree-shaking support**: You can now import only the modules you need, significantly reducing bundle size. |
| 16 | +- **New modular import syntax**: Import components from specific subpaths instead of the main package. |
| 17 | + |
| 18 | +**Migration Examples:** |
| 19 | +```js |
| 20 | +// ❌ Old import syntax (v11 and below) |
| 21 | +import { OlMap, OlTileLayer, OlSourceOSM } from "vue3-openlayers"; |
| 22 | + |
| 23 | +// ✅ New import syntax (v12+) |
| 24 | +import { OlMap } from "vue3-openlayers/map"; |
| 25 | +import { OlTileLayer } from "vue3-openlayers/layers"; |
| 26 | +import { OlSourceOSM } from "vue3-openlayers/sources"; |
| 27 | +import { OlFullScreenControl } from "vue3-openlayers/controls"; |
| 28 | +import { OlStyle } from "vue3-openlayers/styles"; |
| 29 | +import { OlInteractionSelect } from "vue3-openlayers/interactions"; |
| 30 | +``` |
| 31 | + |
| 32 | +#### Component Renaming for Consistency |
| 33 | +All components now use consistent **PascalCase** naming. Duplicate files with inconsistent casing have been removed. |
| 34 | + |
| 35 | +**Source Components:** |
| 36 | +- `OlSourceOsm` ➡️ renamed to **`OlSourceOSM`** |
| 37 | +- `OlSourceBingmaps` ➡️ renamed to **`OlSourceBingMaps`** |
| 38 | +- `OlSourceGeoTiff` ➡️ renamed to **`OlSourceGeoTIFF`** |
| 39 | +- `OlSourceImageWms` ➡️ renamed to **`OlSourceImageWMS`** |
| 40 | +- `OlSourceTileArcgisRest` ➡️ renamed to **`OlSourceTileArcGISRest`** |
| 41 | +- `OlSourceTileJson` ➡️ renamed to **`OlSourceTileJSON`** |
| 42 | +- `OlSourceTileWms` ➡️ renamed to **`OlSourceTileWMS`** |
| 43 | +- `OlSourceWmts` ➡️ renamed to **`OlSourceWMTS`** |
| 44 | +- `OlSourceXyz` ➡️ renamed to **`OlSourceXYZ`** |
| 45 | + |
| 46 | +**Map Controls:** |
| 47 | +- `OlFullscreenControl` ➡️ renamed to **`OlFullScreenControl`** |
| 48 | +- `OlLayerswitcherControl` ➡️ renamed to **`OlLayerSwitcherControl`** |
| 49 | +- `OlLayerswitcherimageControl` ➡️ renamed to **`OlLayerSwitcherImageControl`** |
| 50 | +- `OlMousepositionControl` ➡️ renamed to **`OlMousePositionControl`** |
| 51 | +- `OlOverviewmapControl` ➡️ renamed to **`OlOverviewMapControl`** |
| 52 | +- `OlPrintdialogControl` ➡️ renamed to **`OlPrintDialogControl`** |
| 53 | +- `OlScalelineControl` ➡️ renamed to **`OlScaleLineControl`** |
| 54 | +- `OlVideorecorderControl` ➡️ renamed to **`OlVideoRecorderControl`** |
| 55 | +- `OlZoomsliderControl` ➡️ renamed to **`OlZoomSliderControl`** |
| 56 | +- `OlZoomtoextentControl` ➡️ renamed to **`OlZoomToExtentControl`** |
| 57 | + |
| 58 | +**Interactions:** |
| 59 | +- `OlInteractionClusterselect` ➡️ renamed to **`OlInteractionClusterSelect`** |
| 60 | +- `OlInteractionDragbox` ➡️ renamed to **`OlInteractionDragBox`** |
| 61 | +- `OlInteractionDragrotate` ➡️ renamed to **`OlInteractionDragRotate`** |
| 62 | +- `OlInteractionDragrotatezoom` ➡️ renamed to **`OlInteractionDragRotateAndZoom`** |
| 63 | + |
| 64 | +**Layers:** |
| 65 | +- `OlAnimatedClusterlayer` ➡️ renamed to **`OlAnimatedClusterLayer`** |
| 66 | + |
| 67 | +**Map Components:** |
| 68 | +- `OlGeolocation` component location/naming has been updated |
| 69 | + |
| 70 | +#### Styles No Longer Auto-Imported |
| 71 | +- Styles are no longer automatically imported with the package |
| 72 | +- You must explicitly import both OpenLayers and vue3-openlayers styles |
| 73 | + |
| 74 | +```js |
| 75 | +// Required imports for styles |
| 76 | +import 'ol/ol.css'; |
| 77 | +import 'vue3-openlayers/vue3-openlayers.css'; |
| 78 | +``` |
| 79 | + |
| 80 | +#### Available Import Paths |
| 81 | +The following subpaths are now available for tree-shaking: |
| 82 | +- `vue3-openlayers/animations` |
| 83 | +- `vue3-openlayers/composables` |
| 84 | +- `vue3-openlayers/controls` |
| 85 | +- `vue3-openlayers/geometries` |
| 86 | +- `vue3-openlayers/helpers` |
| 87 | +- `vue3-openlayers/interactions` |
| 88 | +- `vue3-openlayers/layers` |
| 89 | +- `vue3-openlayers/map` |
| 90 | +- `vue3-openlayers/sources` |
| 91 | +- `vue3-openlayers/styles` |
| 92 | + |
| 93 | +### 🔧 Migration Guide |
| 94 | + |
| 95 | +1. **Update imports**: Replace single-package imports with subpath imports |
| 96 | +2. **Fix component names**: Update any components using the old inconsistent casing |
| 97 | +3. **Add style imports**: Explicitly import CSS files where needed |
| 98 | +4. **Review bundle**: Take advantage of smaller bundle sizes with selective imports |
| 99 | + |
| 100 | +### ✨ Other Changes |
| 101 | +- Internal refactoring for better modularity and future maintenance |
| 102 | +- Documentation and examples updated to reflect new import patterns |
| 103 | +- Improved TypeScript support with better type definitions for tree-shaken imports |
| 104 | +- `package.json` exports configured for all new subpaths |
| 105 | +- Removed duplicate component files to eliminate confusion |
44 | 106 |
|
45 | 107 |
|
46 | 108 | ## [11.6.2](https://github.com/MelihAltintas/vue3-openlayers/compare/v11.6.1...v11.6.2) (2025-06-05) |
|
0 commit comments