@mapette/vue
v0.1.7
Published
Vue 3 components for @mapette/core: MapView, MapExplorer (full-screen map with side panel / bottom sheet), MapFooter, photo pins and popovers.
Maintainers
Readme
@mapette/vue
Vue 3 components for @mapette/core.
npm i @mapette/vue @mapette/core maplibre-glThe package ships its .vue sources so that your bundler compiles them for both server and client; with Vite this works out of the box. Server rendering is supported: the map itself mounts on the client.
Components
MapView– the map. Props mirrorcreateMap(preset,mapStyle,locale,center,zoom,interactive,dark,theme,padding,keepSources,popovers,scale). Children get the controller throughuseMap().MapExplorer– the full-screen layout used by both sites:MapView(explore preset), scale bar, compass / locate / zoom buttons,MapSheet, padding wiring (dragging the map lowers the sheet on phones), and keyboard shortcuts (+ −zoom,Llocate,Nnorth,Escback; add your own withshortcuts). Slots:#map,#header, default,#footer.MapSheet– side panel / bottom sheet on its own (v-model:snap,@update:padding).MapFooter– attribution, data sources, shortcuts help, theme toggle and language select, with built-in texts in four languages.UpdateToast– registers the service worker and shows a "new version available · reload" pill at the top when one is waiting, in four languages. Pass:register="import.meta.env.PROD"so the dev server is never cached.MapControls,ScaleBar,LocationMarker,PhotoPins,ClusterExpand,ClusterPopover,MapPopover– thin wrappers over the core objects.
Composables
useMap, useMapObject, useViewportFeatures, useDarkMode, useThemePref.
License
MIT
