@hungpvq/react-map-core
v1.1.0
Published
React MapLibre map container, controls, and hooks over `@hungpvq/map-core`.
Readme
@hungpvq/react-map-core
React MapLibre map container, controls, and hooks over @hungpvq/map-core.
Install
npm install @hungpvq/react-map-core @hungpvq/map-coreStyles
import '@hungpvq/react-map-core/style.css';Usage
import { Map, ZoomControl, HomeControl, FullScreenControl } from '@hungpvq/react-map-core';
import '@hungpvq/react-map-core/style.css';
export function App() {
return (
<Map
mapId="demo"
onMapLoaded={(map) => {
console.info('loaded', map);
}}
>
<ZoomControl position="top-right" />
<HomeControl position="top-right" />
<FullScreenControl position="top-right" />
</Map>
);
}For layers / identify / menus, use @hungpvq/react-map-dataset and call installMapApp() at bootstrap.
Docs
- Hub: map docs
- Controls & registry: map-core docs
- Stable API: stable-api.md — root exports include Experimental field/UI helpers (
Input*,MapButton, …); seepublic-api.spec.ts - Error handling (
errorHandlerfrom@hungpvq/map-core): error-handling.md - Map store /
getMap: map-store.md - Demo: React demo
