avitab icon indicating copy to clipboard operation
avitab copied to clipboard

Implement datarefs to report map coordinates, zoom and range

Open mjh65 opened this issue 3 months ago • 0 comments

This PR implements the enhancement requested in https://github.com/fpw/avitab/issues/198.

The first commit refactors some existing code to put a small wrapper class around the X-Plane API calls. Despite this, the callbacks are still a little more 'C' than 'C++' (reinterpret casts are used), and perhaps could be improved by some more complex (and less readable?) template code.

The second commit adds 4 new datarefs to allow other X-Plane components to obtain the Avitab map coordinates (map centre), the zoom level, and an approximation of the distance from top to bottom of the visible map.

mjh65 avatar Mar 15 '24 14:03 mjh65