Can I use the API to take a map screenshot?

Carlos Vela shared this question 1 week ago
In Progress

From the Locus API I know I can use the method "ActionTools.getMapPreview" to get a screen-shot by a given Point.

What about if I just want to get a screen-shot from what is currently being shown in Locus Map?

Comments (1)


Good day Carlos,

If you wants to get "screenshot" of what is currently visible on the screen, you needs to specify all necessary parameters in request on "mapPreview".

Key is here obtain of "UpdateContainer" class with current app state. This may be done by using Periodic updates:

With known update container, you may have all parameters to request required map screenshot in correct zoom level and map scale.

If there will be need for an more simply "screenshot" method or any issue with this system, let me know and we may discuss it. Keep also in mind, that I just updated wiki page about periodic updates because it was little bit outdated and also because of this, sample application does not work right now ... update (prepared) is needed. Thanks for understanding.