Get Mapxus Token
Get access token by @mapxus/mapxus-auth, you can use venue/building/POI search services without initializing the map.
Get access token by @mapxus/mapxus-auth, you can use venue/building/POI search services without initializing the map.
import { registerWithApiKey, getToken } from '@mapxus/mapxus-auth';
import { BuildingsService } from '@mapxus/mapxus-map';
// register mapxus
registerWithApiKey("${APP_ID}", "${SECRET}");
// use search API individually
const service = new BuildingsService();
service
.searchByGlobal({ keywords: "Square" })
.then((res) => console.log(res.result.buildings));
// get token
getToken().then(token => console.log(token));
