]> git.mxchange.org Git - flightgear.git/commitdiff
httpd: expose airport id to geojson properties
authorTorsten Dreyer <torsten@ŧ3r.de>
Thu, 16 Oct 2014 11:09:43 +0000 (13:09 +0200)
committerTorsten Dreyer <torsten@ŧ3r.de>
Thu, 16 Oct 2014 11:09:43 +0000 (13:09 +0200)
src/Network/http/NavdbUriHandler.cxx

index 5e73d7affe120480417557d64cd2fce9cc455d74..13ee11388bbbbb587d8cfd4ced6fa0d925e86268 100644 (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()) );