Sorry, you need to enable JavaScript to visit this website.

Geometry search

Allow your users to perform a free text search inside geometries specified by circles and/or polygons.

Sample use case: You are planing to visit the area of Amsterdam.  You need find a parking, an ATM and a grocery store in the city centre in Amsterdam and/or in the west part of the city.

Use the code below to try this in your app:

_

List<Geometry> geometries = new ArrayList<>();
geometries.add(new Geometry(new PolygonGeometry(DefaultGeometries.POLYGON_POINTS)));
geometries.add(new Geometry(new CircleGeometry(DefaultGeometries.CIRCLE_CENTER, DefaultGeometries.CIRCLE_RADIUS)));
val circleGeometry = createDefaultCircleGeometry()
val polygonGeometry = createDefaultPolygonGeometry()
val geometriesList = listOf(Geometry(circleGeometry), Geometry(polygonGeometry))

val query = GeometrySearchQueryBuilder.create(term, geometriesList)
    .withLimit(SEARCH_RESULTS_LIMIT)
    .build()

_

GeometrySearchQuery query = new GeometrySearchQueryBuilder(term, geometries)
        .withLimit(SEARCH_RESULTS_LIMIT).build();

SearchApi searchAPI = OnlineSearchApi.create(context);
searchAPI.geometrySearch(query, geometrySearchCallback);
searchApi.geometrySearch(geometryQuery)

 

Sample views utilizing Geometry Search:



image

Geometry search with term: Parking

image

Geometry search with term: ATM

You are here