Request a location using a free-form text input and display it on the map.
This example makes a geocoding request and retrieves the latitude, longitude and complete address details of 200 S Mathilda Ave, Sunnyvale, CA based on a free-form text input. A clickable marker is placed on the location found.
Access to the geocoding service is obtained from the H.service.Platform
by calling getSearchService()
. The geocode()
method is used
to find a location by passing in the relevant q
parameter as defined in
Geocoding and Search API v7.
The styling and display of the response is under the control of the developer.