Geocoding
If you want to use the Map view, you need the coordinates of an address (Latitude & Longitude). Most of the time, this is not available in your existing business data. To makes things easier, Portrait has a geocoding feature integrated, that will create the coordinates for you.
The feature is integrated as a Field Processor and needs minimal setup.
Prerequisites
Portrait uses Mapbox for geocoding. Mapbox is a third-party service, that will be paid per usage. You need to set up an account and generate an access token for Portrait. The access token does not need a specific scope, just give it a name, leave it the URL’s unrestricted and copy the token. It should look like this:
pk.eyJ1IjoidG9rb6ImNsYnV4aTZ4djF4JRc49m12aTRtdG16bWIifQ.v1irJPERjwkxsSXpK_sJlyw
Setup
Set the following in the application YAML file on highest level - not under “application”):
mapbox:
token: 'pk.eyJ1IjoidG9rb6ImNsYnV4aTZ4djF4JRc49m12aTRtdG16bWIifQ.v1irJPERjwkxsSXpK_sJlyw'
url: 'https://api.mapbox.com/geocoding/v5/mapbox.places/'
Source Configuration
After you’ve set up Mapbox in the YAML file, and reloaded the backend, you can use Field Processors | Geo Coding.
Copyright Treskon GmbH.