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.
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.