0

I'm using https://geocoder.api.here.com/6.2/search.json, and when I make a search for "Ile de Ré, France" I have a response but in the object Address I have this :

Address: {Label: "D735, 17000 La Rochelle, France", Country: "FRA", State: "Nouvelle-Aquitaine",…}
Label: "D735, 17000 La Rochelle, France"
Country: "FRA"
State: "Nouvelle-Aquitaine"
County: "Charente-Maritime"
City: "La Rochelle"
Street: "D735"
PostalCode: "17000"

Instead of having the all island... Does someone know how to have the all island address instead of just having a road?

This is the resquest :

https://geocoder.api.here.com/6.2/search.json?language=fr&app_id={APPID}&app_code={APPCODE}&searchtext=%C3%8Ele%20de%20R%C3%A9&additionaldata=IncludeShapeLevel%2C%20default&gen=9&mapview=46.14288%2C-1.5629%3B46.2582%2C-1.25416

Thanks ! =)

2
  • When you say "all the island" what do you mean exactly? The response is going to be one point, not a polygon for the island itself, so it has to select one part of the island (as far as I know). Were you expecting it to allow for a polygon type result? Commented Jan 30, 2020 at 16:47
  • Hi @RaymondCamden, thank you for your answer ! By "all the island" I mean the polygon of the island like the area not just multiple point address. Commented Jan 31, 2020 at 10:38

2 Answers 2

1

It is not entirely clear from your question what your expected response is. If you are expecting a list of all addresses in the area, that is not supported.

If you are expecting to get the shape/area of the island as a polygon, then you need to use the mode "retrieveAreas" as Michael has stated above. This blog post on How to Get the Shape of an Area using the HERE Geocoder should hopefully answer most of your questions regarding this feature.

The API call you are looking for would be the following, which retrieves the postal code area around a location. Note that in order to get the location as a lat/long you need to first Geocoder "Ile de Ré, France" using the forward Geocoder.

https://reverse.geocoder.ls.hereapi.com/6.2/reversegeocode.json
?apiKey=YOUR_API_KEY
&prox=46.20054,-1.39985
&mode=retrieveAreas
&additionaldata=IncludeShapeLevel,postalCode

However, the Geocoder can only retrieve areas such as postal codes, administrative districts, counties, etc. In this case, none of them correspond exactly to the island. For example the island has multiple postal codes and its county covers a much larger area.

You can use this code example I've built to experiment. Here's a screenshot made using this tool to show the area of a postal code on the island.

Postal code on the Ile de Ré, highlighted using the retrieveAreas mode of the HERE Geocoder

Sign up to request clarification or add additional context in comments.

1 Comment

Hi @leopectus, thank you very much for this complete answer ! Indeed, what I'm expecting is to get the shape/area of the island as a polygon. I tried to use the mode "retrieveAreas" but it only works for reversegeocode.json... And what I'm looking for is to use geocode.json with inside the request the params searchtext which correspond to the query in the autocomplete. I don't know if it's clear now ?
0

Try adding mode=retrieveAreas to your API call

2 Comments

Thank you @Michael for your answer ! I tried with this params but what I get is just several address in the island and not the polygon of the island...
Please see my answer on how to get polygons as responses. Unfortunately it's not possible to get the outlines of islands, unless they happen to correspond to an administrative region or postal code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.