fsMapViewSetAltitudeRangeInFeet

This function can be used to set the altitude range which will then be used to compute how the color list will be spread out when the function fsMapViewSetViewMode is set to "Altitude" view mode. 

 

 

Syntax
bool fsMapViewSetAltitudeRangeInFeet(
    FsContext ctx,
    FsTextureId id,
    double dMin,
    double dMax
    )

 

 

Members
Parameters Description
ctx A value of type FsContext provided as an argument of the gauge callback.
id The MapView render ID as returned by the function fsMapViewCreate.
dMin The minimum altitude to use, in ft.
dMax The maximum altitude to use, in ft.

 

 

Return Values

Returns false if:

  • dMax is less than dMin
  • no texture matches the given MapView ID
  • the ctx is invalid

Otherwise it will return true.

 

 

Remarks

Once you give a minimum and a maximum altitude, the colours (defined using fsMapViewSetAltitudeColorList) will be assigned automatically at intervals based on the total number of colours defined. For example, if you have defined 5 colours and set the dMin to 1000 and the dMax to 10000, the first colour will be from sea-level to 1000ft, then the others will be applied every 3000ft:

  • 0 - 1000: colour1
  • 1000 - 4000: colour2
  • 4000 - 7000: colour3
  • 7000 - 10000: colour4
  • 10000+: colour5

 

 

See Also