TerriaJS / terriajs

A library for building rich, web-based geospatial data platforms.
https://terria.io
Apache License 2.0
1.16k stars 361 forks source link

Automate generation/export of map images #2820

Open gordjw opened 6 years ago

gordjw commented 6 years ago

New feature request received via data.gov.au support:

We are currently using the NationalMap to visualise project data. However, doing so repeatedly becomes quite cumbersome.

Is there a way to use the National Map via an API, e.g.

This would allow for faster and increased usage of maps in our projects.

AnaBelgun commented 6 years ago

This case: the user wants to send periodical reports with screen shots of NationalMap data + own data to clients and they want to find a more efficient way to do that. I'll invite Data61 A. Krumpholz into discussion; @philipgrimmett @steve9164 you might be interested in the work flow because it looks like another example of 'report generation'

AnaBelgun commented 6 years ago

From @kring You can do lots of API-like stuff (enable particular catalog items, zoom to a particular location, etc.) by posting cross-window messages into an iframe. For more control, embed TerriaJS using a div rather than an iframe, and then you have full access to TerriaJS's javascript API. The ability to screenshot is still limited by browser capabilities, though. it's generally possible to get a snap of the map in 3D, and a mostly correct snap in 2D. Taking snaps of legends and such tends to be harder