2017-10-10 110 views
2

我想爲它創建使用GeoJSON的實體位置:Orion是否支持GeoJSON格式?

{ 
"id": "1234", 
"name": "test", 
"type": "TestDevice", 

    "location": { 
    "value": { 
     "type": "Point", 
     "coordinates": [2.186447514, 41.3763726, 143.148] 
    }, 
    "type": "geo:json" 
    } 
} 

,但我收到此錯誤:

{ 
    "error": "BadRequest", 
    "description": "attribute must be a JSON object, unless keyValues option is used" 
} 

是否以GeoJSON由獵戶座的支持?

我使用的搬運工馬:

"version": "1.8.0-next" 

感謝和問候

回答

1

它不是地理的問題:JSON支持 這是導致此問題的屬性名稱。它應該是這樣的:

{ 
"id": "1234", 
"name": { 
    "value": "test", 
    "type": "String" 
    }, 
"type": "TestDevice", 

    "location": { 
    "value": { 
     "type": "Point", 
     "coordinates": [2.186447514, 41.3763726, 143.148] 
    }, 
    "type": "geo:json" 
    } 
} 
+1

這將是巨大的,如果你能在您自答案這是問題的確切原因和你是怎麼解決;) – fgalan