LocalFocus Thumbnail API

Generate thumbnails of graphs and maps



Version 1.0




Introduction


Do you want to automatically create thumbnails of LocalFocus charts and maps? This is the place to start!

The LocalFocus Thumbnail API uses HTTP requests. The results are PNG images, with optional retina support. To use this API, you need an API key. Please request one here. We encourage you to cache generated thumbnails, to reduce API calls.


Example

Get a thumbnail of this chart that was created by go.localfocus.nl

curl -o image.png 'https://go.localfocus.nl/services/thumbnail/?api_key=YOUR_API_KEY&code=5984327859a51&width=500&height=550&scale=2'


In depth


Endpoints

Depending on the LocalFocus platform your editors use:

https://go.localfocus.nl/services/thumbnail/
https://platform.localfocus.nl/services/thumbnail/


Method

GET


Required GET parameters

api_key string A valid API key that was given to you by LocalFocus
code string Hyperlinks to charts and maps end with this code, and matches /[a-f0-9]{13}$/.
Example: the code of this chart (https://localfocus2.appspot.com/5984327859a51) is 5984327859a51


Optional GET parameters

width integer Min: 300, max: 1000, default: 600
height integer Min: 300, max: 1000, default: 550
scale integer Min: 1, max: 4, default: 1, use 2 for retina optimized thumbnails