Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (map-gl-compass-pro) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
map-gl-compass-pro
New generation maps require new generation tools!
Usage
As for now map-gl-compass-work works only with react & react-map-gl (react-map-gl is peer dependency). If community will express will of using it with raw mapbox / maplibre library I will add some wrapper around this component.
import MapGL from 'react-map-gl'
import maplibregl from 'maplibre-gl'
import CompassPro from 'map-gl-compass-pro'
(...)
return (
<MapGL
initialViewState={{
longitude: -14.5580,
latitude: 53.4441,
zoom: 14
}}
mapLib={maplibregl}
mapStyle="http:://my-domain.com/mapStyle.json"
>
<CompassPro
visualizePitch // default false
mapId="myMap" // default current
wrapperClass="className" // optional, default placement is bottom left corner (absolutely positioned)
size="lg" // one of 'sm' | 'md' | 'lg'
onNeedleClick={() => doSth()} // default set pitch & bearing to 0
/>
(...)
</MapGL>
);