The navigation controls point to the true north, and not to the magnetic north. You can make the navigation controls point to the magnetic north by installing an ILcdMagneticNorthMap on them:

  • This is how you can install an ILcdMagneticNorthMap on a Lightspeed view:

    //Create the ILcdMagneticNorthMap
    //LuciadLightspeed supports:
    // - WMM maps. See the TLcdWMMMagneticNorthMap class
    // - IGRF maps. See the TLcdIGRFMagneticNorthMap class
    //In this example, we use a TLcdWMMMagneticNorthMap
    ILcdMagneticNorthMap magneticNorthMap = new TLcdWMMMagneticNorthMap("Data/magneticnorth/WMM2020.COF");
    
    //Install the magnetic north map on the navigation controls
    Component navigationControls =
        TLspNavigationControlsBuilder.newBuilder(view)
                                     .allNavigationControls()
                                     .magneticNorthMap(magneticNorthMap)
                                     .build();
  • This is how you can install an ILcdMagneticNorthMap on a GXY view:

    //Create the ILcdMagneticNorthMap
    //LuciadLightspeed supports:
    // - WMM maps. See the TLcdWMMMagneticNorthMap class
    // - IGRF maps. See the TLcdIGRFMagneticNorthMap class
    //In this example, we use a TLcdWMMMagneticNorthMap
    ILcdMagneticNorthMap magneticNorthMap = new TLcdWMMMagneticNorthMap("Data/magneticnorth/WMM2020.COF");
    
    //Create the individual components of the navigation control
    TLcdGXYCompassNavigationControl compassNavigationControl = new TLcdGXYCompassNavigationControl(view);
    TLcdGXYZoomNavigationControl zoomNavigationControl = new TLcdGXYZoomNavigationControl(view);
    
    //Install the magnetic north map on the compass
    compassNavigationControl.setMagneticNorthMap(magneticNorthMap);
    
    //Combine the controls into a single component
    Component navigationControls =
        TLcdGXYNavigationControlsFactory.createNavigationControls(compassNavigationControl, zoomNavigationControl, true);