Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
152bb6f
refactor(export): migrate
jedi-of-the-sea Mar 16, 2026
69c3454
feat(core): add monkeyCrossOrigin to prevent canvas tainting
jedi-of-the-sea Apr 23, 2026
1c9a863
refactor(export): extract functions from store, clean up
jedi-of-the-sea Apr 23, 2026
654db09
feat(export): add functions for downloading different formats
jedi-of-the-sea Apr 23, 2026
49d5504
refactor(export): extract functions
jedi-of-the-sea Apr 24, 2026
148f983
refactor(export): remove unnecessary computed
jedi-of-the-sea Apr 24, 2026
ea0e3c1
fix(export): prevent skewed map in pdf export
jedi-of-the-sea Apr 24, 2026
c0407e1
fix(export): correct plugin name
jedi-of-the-sea Apr 24, 2026
9c91af8
feat(export): add toggle button
jedi-of-the-sea Apr 24, 2026
3023f19
fix(export): position export option buttons next to the toggle button
jedi-of-the-sea Apr 24, 2026
b93eb2d
feat(export): use format specific icon for export buttons
jedi-of-the-sea Apr 24, 2026
9b57700
fix: update package-lock.json
jedi-of-the-sea Apr 24, 2026
5ad5533
chore: update package-lock.json
jedi-of-the-sea Apr 27, 2026
7f90795
fix(export): show button with only one export option
jedi-of-the-sea Apr 27, 2026
5a906b9
refactor(export): migrate more
warm-coolguy May 5, 2026
cb63340
refactor(export): migrate even harder
warm-coolguy May 5, 2026
9108eab
fix: lint
warm-coolguy May 5, 2026
b820e68
refactor(export): rename img export
warm-coolguy May 5, 2026
21f1581
refactor(export): improve tips for tools
warm-coolguy May 6, 2026
cdbdfd4
Update src/plugins/export/store.ts
warm-coolguy May 6, 2026
6404061
Update src/plugins/export/types.ts
warm-coolguy May 6, 2026
0766f77
apply suggestion "half of small is actually bigger"
warm-coolguy May 6, 2026
989d696
refactor(export): shove comment over to remarks
warm-coolguy May 7, 2026
0f45c6a
refactor: add export to snowbox
warm-coolguy May 7, 2026
851bd4c
refactor: resort plugins
warm-coolguy May 7, 2026
5b67acc
fix(export): binding was potentially lost
warm-coolguy May 7, 2026
7ce801d
apply suggestion "move docs"
warm-coolguy May 8, 2026
8f78e68
fix(export): spaces from suggestion
warm-coolguy May 8, 2026
89f637c
fix(export): add forgotten interaction pausing
warm-coolguy May 8, 2026
05028d9
fix(export): liiiint
warm-coolguy May 8, 2026
8060114
refactor(export): readd stuff that was probably needed for interactions
warm-coolguy May 8, 2026
7a34f2e
Merge branch 'next' into vue3/migrate-plugin-export
warm-coolguy May 8, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 43 additions & 1 deletion examples/iceberg/components/IcebergMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@
darkMode ? 'Exit dark mode' : 'Enter dark mode'
}}</span>
</button>
<button
class="kern-btn kern-btn--secondary"
@click="exportPluginActive = !exportPluginActive"
>
<span class="kern-icon kern-icon--photo-camera" />
<span class="kern-label">{{
exportPluginActive ? 'Deactivate export' : 'Activate export'
}}</span>
</button>
</div>
<polar-map
v-if="store.serviceRegister.length"
Expand All @@ -34,9 +43,10 @@
<script setup lang="ts">
import type { PolarContainer } from '@polar/polar'

import { addPlugins, getStore, subscribe } from '@polar/polar'
import { addPlugins, removePlugin, getStore, subscribe } from '@polar/polar'
import pluginAddressSearch from '@polar/polar/plugins/addressSearch'
import pluginAttributions from '@polar/polar/plugins/attributions'
import pluginExport from '@polar/polar/plugins/export'
import pluginFilter from '@polar/polar/plugins/filter'
import pluginFullscreen from '@polar/polar/plugins/fullscreen'
import pluginIconMenu from '@polar/polar/plugins/iconMenu'
Expand Down Expand Up @@ -153,6 +163,12 @@ watch(map, (map) => {
displayComponent: true,
layoutTag: 'BOTTOM_LEFT',
}),
pluginExport({
displayComponent: true,
layoutTag: 'MIDDLE_LEFT',
download: true,
formats: ['pdf', 'jpeg', 'png'],
}),
Comment thread
dopenguin marked this conversation as resolved.
])

subscribe(map, 'core', 'language', (newLanguage) => {
Expand All @@ -177,6 +193,32 @@ const darkMode = computed({
},
})

const exportPluginActive = computed({
get: () => {
if (!map.value) {
return
}
return Boolean(getStore(map.value, 'export'))
},
set: (value: boolean) => {
if (!map.value) {
return
}
if (value) {
addPlugins(map.value, [
pluginExport({
displayComponent: true,
layoutTag: 'MIDDLE_LEFT',
download: true,
formats: ['pdf', 'jpeg', 'png'],
}),
])
} else {
removePlugin(map.value, 'export')
}
},
})

function switchLanguage() {
if (!map.value) {
return
Expand Down
11 changes: 11 additions & 0 deletions examples/snowbox/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
} from '@polar/polar'
import pluginAddressSearch from '@polar/polar/plugins/addressSearch'
import pluginAttributions from '@polar/polar/plugins/attributions'
import pluginExport from '@polar/polar/plugins/export'
import pluginFilter from '@polar/polar/plugins/filter'
import pluginFullscreen from '@polar/polar/plugins/fullscreen'
import pluginGeoLocation from '@polar/polar/plugins/geoLocation'
Expand Down Expand Up @@ -90,7 +91,7 @@
colorScheme,
startCenter: [565874, 5934140],
layers: [
// TODO: Add internalization to snowbox

Check warning on line 94 in examples/snowbox/index.js

View workflow job for this annotation

GitHub Actions / Linting

Unexpected 'todo' comment: 'TODO: Add internalization to snowbox'
{
id: basemapId,
visibility: true,
Expand Down Expand Up @@ -260,6 +261,16 @@
additionalMaps.length = 0
})

addPlugin(
map,
pluginExport({
displayComponent: true,
layoutTag: 'MIDDLE_LEFT',
download: true,
formats: ['pdf', 'jpeg', 'png'],
})
)

addPlugin(
map,
pluginAttributions({
Expand Down
Loading
Loading