Jump to content
Sign in to follow this  
o5_

RscMapControl on main display not centered

Recommended Posts

Gentlemen, greetings again. I created a display control to mimic a MFD screen with a map/nav page with the following code...

    with uiNamespace do {
        disableSerialization;
        TGPMFD = findDisplay 46 ctrlCreate ["RscPicture", 89978];
        TGPMFD ctrlSetPosition [
            0.69 * safezoneW + safezoneX,
            0.578 * safezoneH + safezoneY,
            0.31 * safezoneW,
            0.415 * safezoneH
        ];
        TGPMFD ctrlSetText "ACC4I\mfd.paa";

        TGPNav = findDisplay 46 ctrlCreate ["RscMapControl", 89980];
        TGPNav ctrlSetPosition [
            0.7205 * safezoneW + safezoneX,
            0.619 * safezoneH + safezoneY,
            0.2475 * safezoneW,
            0.33 * safezoneH
        ];
	};

I have it updating properly but I'll use this picture to describe the issue...

.x8Hdpca.jpg

 

any ideas how I can fix this. I think I have to center the map on the center of the control.?.? Thank you!

Share this post


Link to post
Share on other sites

map controls created with ctrlCreate dont show position properly. there may be some mathematical way to fix it but its easier to just define your display as a config class

  • Like 2

Share this post


Link to post
Share on other sites

Thanks man. I look into using config classes.

Share this post


Link to post
Share on other sites

Might be similar issue to:

Whatever it causes it. Sometimes it works, sometimes not. Always on vanilla maps. Might be something that isn't defined correctly that causes the offset.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×