Talk:MapStructure Optimizations

From FlightGear wiki
Jump to navigation Jump to search

selectable Ranges API

var  setSelectableMapRangesNm = func (range_vector, unit='nm') {
foreach(var range; range_vector) {
 var groupName = sprintf("visibility-range-%d-%s",range, unit);
 map.createChild("group", groupName);
 }# foreach range
};

# range based allocation of layers/groups
setSelectableMapRangesNm( [5,10, 20, 40, 80, 160, 320, 640] );

test

{{#vardefine:variablename|specifiedvalue}}