UNPKG

ipntk-map-browser

Version:

map sdk

118 lines (105 loc) 5.15 kB
<!DOCTYPE html> <html> <head> <title>Load Map</title> <meta charset='utf-8'> <!-- dependent maplibre-gl --> <script src='https://unpkg.com/maplibre-gl@1.15.2/dist/maplibre-gl.js'></script> <link href='https://unpkg.com/maplibre-gl@1.15.2/dist/maplibre-gl.css' rel='stylesheet' /> <script src="https://unpkg.com/ipntk-map-browser@2.0.4/dist/bundle.js"></script> <style> body { margin: 0; padding: 0; } html, body, #map { height: 100%; } </style> </head> <body> <div id="map"></div> <script type="module"> // init maplibre-gl map var maplibreMap = new maplibregl.Map({ container: 'map', zoom: 18.0 }); var map = await new khi.iPntkMap().initMap({ map: maplibreMap, customerId: "khitest", buildingId: "edf766d08f4e468eb9499d86251b88cf", //mitsuioutletparkosakatsurumi_osaka_af14ec57c89e487ca997d54399bf6084 // floor: "10F", // poiId: '9230693', // enableFloorControl: false, // enableBuildingSelector: false, // theme: "halloween" }); map.renderComplete(async () => { // // map.enableFloorControl("bottom-left"); // // map.enableBuildingSelector("bottom-right"); // // map.onIndoorPoiListener(function (evt) { // // console.log(evt) // // new maplibregl.Popup() // // .setLngLat(evt.lngLat) // // .setHTML(`name:${evt.feature.properties.name}`) // // .addTo(maplibreMap); // // }); // map.onMapClickListener(function (evt) { // console.log(evt) // // console.log(map.currentFloor) // // console.log(map.floors) // // console.log(map.building) // //Building Service // // let service = new BuildingsService(); // // service.searchByGlobal("") // // .then((res) => { console.log(res) }) // // service.searchByIds("71cdc225489e4ce7a4d17ec4c98feb73,mitsuioutletparkosakatsurumi_osaka_af14ec57c89e487ca997d54399bf6084") // // .then((res) => { console.log(res) }) // // service.searchByDistance('クリスタルタワー', [evt.lngLat.lng, evt.lngLat.lat], 40) // // .then((res) => { // // console.log(res) // // }) // // service.searchByBbox("三井アウトレットパーク", [135.59100, 34.71146, 135.59511, 34.71366]) // // .then((res) => { // // console.log(res) // // }) // //Poi Service // // let service = new PoiService(); // // service.searchByIds(['9230693']) // // .then((res) => { // // console.log(res); // // }) // // service.searchOrientation(90, '71cdc225489e4ce7a4d17ec4c98feb73', [evt.lngLat.lng, evt.lngLat.lat], 5000, 'point', 1) // // service.searchByDistance("", [evt.lngLat.lng, evt.lngLat.lat], 1000) // // .then((res) => { // // console.log(res) // // }) // // service.searchCategory("71cdc225489e4ce7a4d17ec4c98feb73") // // .then((res) => { console.log(res) }) // // service.searchByBbox("", [135.59100, 34.71146, 135.59511, 34.71366]) // // .then(res => { console.log(res) }) // // service.searchByBuildingId("", "71cdc225489e4ce7a4d17ec4c98feb73") // // .then((res) => { console.log(res) }) // // let routeService = new RouteService(); // // let fromCoord = [135.1798464293367, 34.68062341223067]; // // let fromFloor = "26F"; // // let fromBuilding = "71cdc225489e4ce7a4d17ec4c98feb73"; // // let toBuilding = "71cdc225489e4ce7a4d17ec4c98feb73"; // // let toCoord = [135.18008678836117, 34.680590546049004]; // // let toFloor = "26F"; // // routeService.search(fromCoord, toCoord, fromFloor, toFloor, fromBuilding, toBuilding) // // .then((res) => { // // console.log(res) // // }) // }); // // map.onFloorChangeListener(function (evt) { // // console.log(evt) // }); }) </script> </body> </html>