@mapxus/mapxus-map-jp 9.3.0 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -2,35 +2,37 @@
2
2
 
3
3
  ## Dependency
4
4
 
5
- maplibre-gl
5
+ maplibre-gl @mapxus/mapxus-auth-jp
6
6
 
7
7
  ## Install
8
8
  ```
9
- npm install @mapxus/mapxus-map-jp
9
+ $ npm install maplibre-gl @mapxus/mapxus-map-jp @mapxus/mapxus-auth-jp --save
10
10
  ```
11
11
 
12
- **Tips**: We do not recommend you install `maplibre-gl` by yourself. Each version of `@mapxus/mapxus-map-jp` uses a specific version of `maplibre-gl`,
13
- `@mapxus/mapxus-map-jp` will automatically install it with the matched version.
12
+ **Tips**: @mapxus/mapxus-map-jp depends on specific versions of maplibre-gl and @mapxus/mapxus-auth-jp([API Doc](https://map-service.mapxus.com/dpw/api/v1/api/mapxusAuth/web/0.0.1/index.html)). Make sure to use the compatible versions when installing.
14
13
 
15
14
  ## Example
16
15
  ```js
17
16
  import 'maplibre-gl/dist/maplibre-gl.css';
18
- import maplibregl from 'maplibre-gl';
19
- import * as MapxusMap from '@mapxus/mapxus-map-jp';
17
+ import {Map as Maplibre} from 'maplibre-gl';
18
+ import {registerWithApiKey} from "@mapxus/mapxus-auth-jp";
19
+ import {Map} from '@mapxus/mapxus-map-jp';
20
20
 
21
- const maplibreMap = new maplibregl.Map({
21
+ // register access first
22
+ registerWithApiKey('your_appId', 'your_secret');
23
+
24
+ // then call Mapxus products
25
+ const maplibreMap = new Maplibre({
22
26
  container: 'map',
23
27
  zoom: 17,
24
28
  });
25
-
26
- const map = new MapxusMap.Map({
29
+ const map = new Map({
27
30
  map: maplibreMap,
28
- appId: 'your_appId',
29
- secret: 'your_secret',
30
- buildingId: 'building_id', // example: elements_hk_dc005f
31
+ buildingId: 'building_id',
31
32
  // or
32
33
  // venueId: 'venue_id',
33
34
  // floorId: 'floor_id',
35
+ // sharedFloorId: 'sharedFloor_id',
34
36
  // poiId: 'poi_id',
35
37
  });
36
38
  ```