findPlacesNearPoint

findPlacesNearPoint

Function
findPlacesNearPoint(requestOptionsIFindPlacesNearPointOptions): Promise<IFindPlacesNearPointResponse>

Searches places that are within a given radius of a geographic point. You must supply the x and y coordinates of the point that you wish to search from. You can either specify a search radius, or use the default (500 meters). You could use this method to search for places around a user's GPS position, or a location clicked on a map.

The returned places contain basic data such as name, category and location. You can use the getPlace method to get additional details for a given place.

You can refine the results by supplying additional search parameters, including:

As this request can return many results, pagination is supported. When a query results in more than [pageSize] places, the response will contain the propertypagination in addition to place results. If pagination exists, an additional methodresponse.nextPage() can be used to get the next page of results.

1
2
3
4
5
6
7
8
9
10
11
import { findPlacesNearPoint } from "@esri/arcgis-rest-places";
import { ApiKeyManager } from "@esri/arcgis-rest-request";

const response = await findPlacesNearPoint({
  x: -3.1883,
  y: 55.9533,
  radius: 100,
  authentication: ApiKeyManager.fromKey("YOUR_API_KEY");
});

console.log(response);
Parameters
ParameterType
requestOptions
IFindPlacesNearPointOptions
Returns 
Promise<IFindPlacesNearPointResponse>

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close