Skip to content

PrintControl

Usecase

  • Export current map view for reporting or sharing.
  • Provide one-click print/export in admin dashboards.

Props

PropDescriptionTypeRequiredDefault Value
mapIdstringfalse--
dragIdstringfalse--
btnWidthnumberfalse40
position'top-left', 'top-right', 'bottom-left', 'bottom-right'false'bottom-right'
controlVisiblebooleanfalsetrue

and

PropDescriptionTypeRequiredDefault Value
fileNameThe name of the exported filestringfalsemap

Slots

NameDescription
defaultSlot for custom content

Usage

vue
<script setup lang="ts">
import { Map } from '@hungpvq/vue-map-core';
import { PrintControl } from '@hungpvq/vue-map-print';
import '@hungpvq/vue-map-core/style.css';
import '@hungpvq/vue-map-print/style.css';
</script>

<template>
  <Map>
    <PrintControl fileName="custom-map" />
  </Map>
</template>