XPLMMapGetNorthHeading

XPLM_API float      XPLMMapGetNorthHeading(
                         XPLMMapProjectionID  projection,    
                         float                mapX,    
                         float                mapY);    

Returns the heading (in degrees clockwise from “up”) that corresponds to north at a given point on the map. In other words, if your runway has a true heading of 360, you would use “north” as the Cartesian angle at which to draw the runway on the map. (You would add the result of XPLMMapGetNorthHeading() to your true heading to get the map angle.)

This is necessary becuase X-Plane’s map can be rotated to match your aircraft’s orientation; north is not always “up.”

Only valid from within a map layer callback (one of XPLMMapPrepareCacheCallback_f, XPLMMapDrawingCallback_f, XPLMMapIconDrawingCallback_f, or XPLMMapLabelDrawingCallback_f.)