1
0
Fork 0

httpd: expose airport id to geojson properties

This commit is contained in:
Torsten Dreyer 2014-10-16 13:09:43 +02:00
parent a59e04ff36
commit e786b1a54e

View file

@ -189,6 +189,8 @@ static cJSON * createPropertiesFor(FGPositionedRef positioned)
cJSON * properties = cJSON_CreateObject();
cJSON_AddItemToObject(properties, "name", cJSON_CreateString(positioned->name().c_str()));
// also add id to properties
cJSON_AddItemToObject(properties, "id", cJSON_CreateString(positioned->ident().c_str()));
cJSON_AddItemToObject(properties, "type", cJSON_CreateString(positioned->typeString()));
cJSON_AddItemToObject(properties, "elevation-m", cJSON_CreateNumber(positioned->elevationM()));
addNAVProperties( properties, dynamic_cast<FGNavRecord*>(positioned.get()) );