From e786b1a54e855a73a31122f11bafbb8c999abeba Mon Sep 17 00:00:00 2001 From: Torsten Dreyer Date: Thu, 16 Oct 2014 13:09:43 +0200 Subject: [PATCH] httpd: expose airport id to geojson properties --- src/Network/http/NavdbUriHandler.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Network/http/NavdbUriHandler.cxx b/src/Network/http/NavdbUriHandler.cxx index 5e73d7aff..13ee11388 100644 --- a/src/Network/http/NavdbUriHandler.cxx +++ b/src/Network/http/NavdbUriHandler.cxx @@ -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(positioned.get()) );