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 spot, an ATM, and a grocery store in the city centre in Amsterdam and/or in the west part of the city.

Use the following code to try this in your app:

1List<Geometry> geometries = new ArrayList<>()
2geometries.add(new Geometry(new PolygonGeometry(DefaultGeometries.POLYGON_POINTS)));
3geometries.add(new Geometry(new CircleGeometry(DefaultGeometries.CIRCLE_CENTER, DefaultGeometries.CIRCLE_RADIUS)));
1val circleGeometry = createDefaultCircleGeometry()
2val polygonGeometry = createDefaultPolygonGeometry()
3val geometriesList = listOf(Geometry(circleGeometry), Geometry(polygonGeometry))
5val query = GeometrySearchQueryBuilder.create(term, geometriesList)
7 .build()
1GeometrySearchQuery query = new GeometrySearchQueryBuilder(term, geometries)
2 .withLimit(SEARCH_RESULTS_LIMIT).build();
4SearchApi searchAPI = OnlineSearchApi.create(context, BuildConfig.SEARCH_API_KEY);
5searchAPI.geometrySearch(query, geometrySearchCallback);

Sample views utilizing Geometry Search:


Geometry search with term: Parking


Geometry search with term: ATM