With the attached patch,
the Geocoder module may provide the following API Url endpoints (with Json output), to be consumed for performing direct Geocode and Reverse Geocode operations respectively, allowing also easy and custom implementation of Geocode Autocomplete inputs to third party (dependent) modules.

Geocode

This endpoint allows to process a Geocode operation (get Geo Coordinates from Addresses) on the basis of an input Address, the operational Geocoders and an (optional) output Format (Dumper).

Path: '/geocoder/api/geocode'
Method: GET
Access Permission: 'access geocoder api endpoints'
Successful Response Body Format: json

Reverse Geocode

This endpoint allows to process a Reverse Geocode operation (get an Address from Geo Coordinates) on the basis of an input string of atitude and Longitude coordinates, the operational Geocoders and an (optional) output Format (Dumper).

Path: '/geocoder/api/reverse_geocode'
Method: GET
Access Permission: 'access geocoder api endpoints'
Successful Response Body Format: json

NOTE:

The patch updates/integrates the Readme.md file with API Endpoints use parameters details.

Comments

itamair created an issue. See original summary.

itamair’s picture

Status: Active » Needs review
StatusFileSize
new11.77 KB
itamair’s picture

Version: 8.x-2.x-dev » 8.x-2.2
Priority: Normal » Major
Related issues: +#3077010: Geocoder API Url endpoints for performing Geocode and Reverse Geocode operations (8.x-3.x)
itamair’s picture

Issue summary: View changes
itamair’s picture

Issue summary: View changes
itamair’s picture

StatusFileSize
new10.81 KB

Switched too "geocoder" parameter name (singular) ...

itamair’s picture

StatusFileSize
new13.21 KB

added 'formatted_address' and 'geometry' properties to standard "array" geocoder outputs format, to harmonize to the googlemaps geocoder output.

  • itamair committed 9d625fb on 8.x-2.x
    Issue #3077008 by itamair: Geocoder API Url endpoints for performing...
itamair’s picture

Status: Needs review » Fixed

Committed into dev and into new 8.x-2.3 release.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.