36 lines
885 B
JavaScript
36 lines
885 B
JavaScript
"use strict";
|
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
exports.Geo = void 0;
|
|
const Feature_1 = require("../types/Feature");
|
|
class Geo extends Feature_1.Feature {
|
|
cache;
|
|
constructor(cache) {
|
|
super();
|
|
this.cache = cache;
|
|
}
|
|
async searchPoi(name, areaId, typeCode, indexFrom, count) {
|
|
const { result } = await this.cache.exec('geoService', {
|
|
api: 'geo',
|
|
params: {
|
|
name,
|
|
areaId,
|
|
indexFrom,
|
|
count,
|
|
}
|
|
});
|
|
return result;
|
|
}
|
|
;
|
|
async regeo(longitude, latitude) {
|
|
const { result } = await this.cache.exec('geoService', {
|
|
api: 'regeo',
|
|
params: {
|
|
longitude,
|
|
latitude,
|
|
},
|
|
});
|
|
return result;
|
|
}
|
|
}
|
|
exports.Geo = Geo;
|