Mauro Maggi
Mauro Maggi

Reputation: 30

Possible bug in Geocoding API

under some circumstances, a request for the geocoder API in which a ParsedRequest object is requested (via the responseattributes parameter), does not contain a ParsedRequest object in the response. To reproduce (app id and code are omissis):

curl https://geocoder.api.here.com/6.2/geocode.json\?jsonattributes\=1\&searchtext\=marghera+Venezia+Veneto+Italia\&language\=it-IT\&maxresults\=1\&app_id\=xxx\&app_code\=xxx\&responseattributes\=mq%2Cmt%2Cpr

matches correctly as a district, but the expected ParsedRequest object is not present in the response

Conversely, A ParsedRequest object is present as expected if in the previous request we change “marghera” to “san+marco”:

curl https://geocoder.api.here.com/6.2/geocode.json\?jsonattributes\=1\&searchtext\=san+marco+Venezia+Veneto+Italia\&language\=it-IT\&maxresults\=1\&app_id\=xxx\&app_code\=xxx\&responseattributes\=mq%2Cmt%2Cpr 

This time it matches correctly as “street” and the ParsedRequest object is present in the response as expected.

From this sample alone it seems that when the match is a district, the ParsedRequest object is not being populated. I've not yet tried with other district samples.

Upvotes: 0

Views: 83

Answers (1)

ckHERE
ckHERE

Reputation: 334

The documentation unfortunately does not mention it, but ParsedRequest will be returned for Street- and Housenumber level responses only.

Your first example "Marghera, Venice, Veneto, Italy" is a district level result, hence no ParsedRequest in the reponse.

https://developer.here.com/documentation/geocoder/topics/example-geocode-parsedrequest.html

Upvotes: 1

Related Questions