XPLMMapWillBeDeletedCallback_f
typedef void (* XPLMMapWillBeDeletedCallback_f)(
XPLMMapLayerID inLayer,
void * inRefcon);
Called just before your map layer gets deleted. Because SDK-created map layers have the same lifetime as the X-Plane map that contains them, if the map gets unloaded from memory, your layer will too.