I'm currently building an web app which requires to get HOUSE Name (not house number) but api response only returning HouseNumber.
Is there is any attribute need to set to get the house name on reverse Reverse Geocode Resource.
Generally, we don't have any house names. Famous buildings(eg: film star houses), apartments which are considered POI are listed under category: building and have title field which is the name of the building. See an example below (use your app id and code):
https://places.demo.api.here.com/places/v1/discover/search?at=19.05743%2C72.83659&q=Bella+Vista+Apartments&Geolocation=geo%3A19.057769%2C72.836137&Accept-Language=en-US%2Cen%3Bq%3D0.5&app_id=xxxxx&app_code=xxxxx
Related
According to the docs, a list of categories can be passed to the browse api to get specific types of locations/businesses.
https://developer.here.com/documentation/geocoding-search-api/dev_guide/topics/endpoint-browse-brief.html
However, it looks like some results are missing when sending a mix of level 1, level 2, and level 3 categories.
ex: The following lat/lng is the exact location of a bar called Liberty in Austin, TX.
If a level 1 category is passed by itself, then Liberty shows up.
https://browse.search.hereapi.com/v1/browse?at=30.26271,-97.72524&limit=20&categories=100&apiKey=
However, if the same query is sent with the brewery level 3 category passed, then it only returns breweries and Liberty is missing.
https://browse.search.hereapi.com/v1/browse?at=30.26271,-97.72524&limit=20&categories=100,300-3000-0350&apiKey=
Are the docs incorrect/ambiguous or is there something incorrect about how this is being called?
Can you try using code "300-3000-0023" or "700-7460-0115". They are for level3 categories code for tourist attractions and tourist information
https://browse.search.hereapi.com/v1/browse?at=30.26271,-97.72524&limit=100&categories=300-3000-0023,300-3000-0350&apiKey=XXXX
I am using a Google Places API to return ratings for an entered property. When I enter the property name as the search term, a rating is returned, but if I attempt to return a rating by using an address (which is supported by the text input) I do not receive a response. I have tried searching an address through the API, returning a Place ID and then using the Place ID to return a rating, but that does not work.
This API returns a rating: https://maps.googleapis.com/maps/api/place/findplacefromtext/json?input=The+Shops+At+Chestnut+Hill&inputtype=textquery&fields=rating&key=[MY API_KEY]
This is the same property, but searched by address, which does not: https://maps.googleapis.com/maps/api/place/findplacefromtext/json?input=199+Boylston+St+Chestnut+Hill+MA&inputtype=textquery&fields=rating&key=[MY API_KEY]
Is there something different with the formatting of address inputs I am not doing correctly?
The places API has separate ids for the address/building and the establishment in it. The address/building won't have the rating, the place/establishment will.
From the PlaceId Finder
The Shops at Chestnut Hill
Place ID: ChIJkcWRbZF444kRJUJjXdUFIOw
199 Boylston St
Place ID: ChIJ4TgqFZF444kR2XHKhTgsiNs
(although I do see an entry in the dropdown for the "place" when I enter the address)
The Places API nearbySeach only returns places, not address place ids. The geocoder returns the place_id of the address. But the nearbySearch takes a set of coordinates, not an address, so to get those results from an address requires two calls, one to geocode the address, one to get the nearbySearch results from that location.
Note that there are multiple results at the location of that address (4 exactly at the location returned from geocoding "199 Boylston St Chestnut Hill MA", and 15 other places that are nearby and in the footprint of "The Shops at Chestnut Hill"), more if you use pagination to get more than 20 results.
On the google places api site, they have an example query that returns a load of detail:
site:
https://developers.google.com/places/web-service/details
query:
https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJN1t_tDeuEmsRUsoyG83frY4&key=My-API-Key
Place_id appears to be the key here. So I'm trying to reverse-engineer this example, starting from information that a human being would actually have, to end up with this place_id.
Address from the example:
48 Pirrama Rd, Pyrmont NSW 2009, Australia
Places API query from the address:
https://maps.googleapis.com/maps/api/place/textsearch/json?query=48+Pirrama+Rd,+Pyrmont+NSW+2009,+Australia&key=My_API_Key
The result contains a different place_id:
ChIJ8UadyjeuEmsRDt5QbiDg720
And the place details with that place_id are much poorer than the original example:
https://maps.googleapis.com/maps/api/place/details/json?placeid=ChIJ8UadyjeuEmsRDt5QbiDg720&key=My-API-Key
So what am I missing here? How do I start from human-place information and get to the place_id that has the great place details?
EDIT: why the down votes? Am I trying to do something that isn't allowed?
Thanks,
sff
I think your text search is returning the office building, whereas your first search is returning the Google office within the office building. You can fix your text search by adding the name of the company and removing some of the search terms.
I'm not sure why just adding 'google' to the search term doesn't return the result you want though.
We are currently using the google trip planning feature on our transit website. The issue we are running into is the fact that when a customer types in a starting point (for example "Queensway" in Kelowna, BC Canada) we get auto-fill results from all over North America. Can the auto-fill results be restricted to a specific province or state? Thanks!
Try using Component Filtering
In a geocoding response, the Google Maps Geocoding API can return address results restricted to a specific area. The restriction is specified using the components filter. A filter consists of a list of component:value pairs separated by a pipe (|). Only the results that match all the filters will be returned. Filter values support the same methods of spelling correction and partial matching as other geocoding requests. If a geocoding result is a partial match for a component filter it will contain a partial_match field in the response.
The components that can be filtered include:
route matches long or short name of a route.
locality matches against both locality and sublocality types.
administrative_area matches all the administrative_area levels.
postal_code matches postal_code and postal_code_prefix.
country matches a country name or a two letter ISO 3166-1 country code.
Note: Each address component can only be specified either in the address parameter or as a component filter, but not both. Doing so may result in ZERO_RESULTS.
A geocode for "Santa Cruz" with components=country:ES will return Santa Cruz de Tenerife in Canary Islands, Spain. Request:
https://maps.googleapis.com/maps/api/geocode/json?address=santa+cruz&components=country:ES&key=YOUR_API_KEY
See this sample: Place Autocomplete Hotel Search for code implementation.
Hope it helps!
Is it possible to have the Geocoding API works and sometimes doesn't work for some reason?
Here is the detail what I am trying to request:
http://geocoder.cit.api.here.com/6.2/geocode.xml?app_id=DemoAppId01082013GAL&app_code=AJKnXv84fjrb0KIHawS0Tg&gen=4&country=Australia&state=Tas&district=Wynyard&postalcode=7321&street=86 Jackson Street
and Here is the demo version from the official website:
http://geocoder.cit.api.here.com/6.2/geocode.xml
?app_id=DemoAppId01082013GAL
&app_code=AJKnXv84fjrb0KIHawS0Tg
&gen=7
&housenumber=425
&street=W+Randolph
&city=Chicago
I am using the Free version of it and I have no idea why it works sometimes and doesn't in other times.
Thank you
When you are making a structured address query, by default, all parts of the address need to match. Given that there is no international standard for addresses, the HERE geocoder could be placing parts of the address in an alternative part of the structure.
In your case Wynard is recognized as a city, not a district. Now it is possible you could want this to fail as an invalid address, but it is also possible to tell the Geocoder to be a little more lenient by using the FlexibleAdminValues parameter in the AdditionalData
see the User Guide here
FlexibleAdminValues
N (positive integer <= 1). Customizes flexibility in the input values
for the admin hierarchy defined in LocationFilterType. The value is a
bitmask defining which hierarchies might be swapped without impacting
the match level:
0: No swapping at all (default). Exact admin hierarchy values are
expected as input
1: City and District swapping
Please note this
option is for geocoding addresses and needs at least street level
input to work as designed. It will not return expected results when
the input is a named place only (e.g. city or district name).
So the following url will work for you provided you have a street address:
http://geocoder.cit.api.here.com/6.2/geocode.xml?app_id=APP_ID&app_code=APP_CODE&gen=7&AdditionalData=FlexibleAdminValues,1&country=Australia&state=tas&district=Wynyard&...etc
Another alternative is to not use the structured input parameters but let the HERE Geocoder sort out the identification and categorization of the input tokens.
By using the searchtext parameter and providing all your data as the input value the Geocoder can match and score the tokens.
E.g.: http://geocoder.cit.api.here.com/6.2/geocode.xml?app_id=DemoAppId01082013GAL&app_code=AJKnXv84fjrb0KIHawS0Tg&gen=7&searchtext=Australia%20Tas%20Wynyard%207321%2086%20Jackson%20Street