maplibre-gl
npm install @mapxus/mapxus-map
Tips: We do not recommend you install maplibre-gl
by yourself. Each version of @mapxus/mapxus-map
uses a specific version of maplibre-gl
,
@mapxus/mapxus-map
will automatically install it with the matched version.
import 'maplibre-gl/dist/maplibre-gl.css';
import maplibregl from 'maplibre-gl';
import * as MapxusMap from '@mapxus/mapxus-map';
const maplibreMap = new maplibregl.Map({
container: 'map',
zoom: 17,
});
const map = new MapxusMap.Map({
map: maplibreMap,
appId: 'your_appId',
secret: 'your_secret',
buildingId: 'building_id', // example: elements_hk_dc005f
// or
// venueId: 'venue_id',
// floorId: 'floor_id',
// poiId: 'poi_id',
});
More sample page at MapxusMap Sample Web
Docs are available at MapxusMap JS SDK API Docs
3-Clause BSD