PlacesQueryResult
对象包括 queryPlacesNearPoint() 和 queryPlacesWithinExtent() 方法的结果。除了结果本身,还包括上一组或下一组查询参数。结果是 PlaceResult 对象数组。
示例
require([
"geoscene/rest/places",
"geoscene/rest/support/PlacesQueryParameters"
], function(places, PlacesQueryParameters) {
const point = {
type: "point", // autocasts as new Point()
longitude: 17.81840,
latitude: 59.42145
};
const swedishPlacesQueryParameters = new PlacesQueryParameters({
,
categoryIds: ["11077"], // Bathroom Contractor
radius: 10000, // set radius to 10,000 meters
point
});
function findPlaces() {
places.queryPlacesNearPoint(swedishPlacesQueryParameters).then(showPlaces);
}
function showPlaces(placesSolveResult) {
// results from the queryPlacesNearPoint() method
console.log("PlacesQueryResult: ", placesSolveResult);
}
findPlaces();
});
构造函数
属性概述
所有属性都可以设置、获取和监听。请参阅使用属性主题。
名称 | 类型 | 描述 | 类 |
---|---|---|---|
String | 类的名称。 更多详情 | Accessor | |
PlacesQueryParameters | 下一组结果的查询参数。 更多详情 | PlacesQueryResult | |
PlacesQueryParameters | 上一组结果的查询参数。 更多详情 | PlacesQueryResult | |
PlaceResult[] | 使用 queryPlacesNearPoint() 和 queryPlacesWithinExtent() 方法搜索位置的结果数组。 更多详情 | PlacesQueryResult |
属性详细信息
-
类的名称。声明的类名称格式化为
geoscene.folder.className
。
-
nextQueryParams PlacesQueryParameters
-
下一组结果的查询参数。
-
previousQueryParams PlacesQueryParameters
-
上一组结果的查询参数。
-
results PlaceResult[]
-
使用 queryPlacesNearPoint() 和 queryPlacesWithinExtent() 方法搜索位置的结果数组。
- 另请参阅
方法概述
名称 | 返回值类值 | 描述 | 类 |
---|---|---|---|
添加一个或多个与对象生命周期相关联的句柄 更多详情 | Accessor | ||
Boolean | 如果存在指定的句柄组,则返回 true。 更多详情 | Accessor | |
移除对象拥有的句柄组。 更多详情 | Accessor |
方法详细说明
-
addHandles(handleOrHandles, groupKey)inherited
-
添加一个或多个与对象的生命周期相关联的句柄。当对象被销毁时,将移除句柄。
// Manually manage handles const handle = reactiveUtils.when( () => !view.updating, () => { wkidSelect.disabled = false; }, { once: true } ); this.addHandles(handle); // Destroy the object this.destroy();
参数handleOrHandles WatchHandle|WatchHandle[]对象销毁后,标记为要移除的句柄。
groupKey *optional标识句柄应添加到的组的键。组中的所有句柄稍后都可使用 Accessor.removeHandles() 进行删除。如果未提供键,则句柄将被添加到默认组。
-
如果存在指定的句柄组,则返回 true。
参数groupKey *optional组键。
返回类型 描述 Boolean 如果存在指定的句柄组,则返回 true
。示例// Remove a named group of handles if they exist. if (obj.hasHandles("watch-view-updates")) { obj.removeHandles("watch-view-updates"); }
-
removeHandles(groupKey)inherited
-
移除对象拥有的句柄组。
参数groupKey *optional要移除的组键或组键的数组或集合。
示例obj.removeHandles(); // removes handles from default group obj.removeHandles("handle-group"); obj.removeHandles("other-handle-group");