2️⃣ 층 별 geojson 호출
한 프로젝트의 특정 층에 해당하는 GeoJSON 파일을 조회하기 위해 다음과 같은 API를 사용합니다.
📍 GET
/open-api/v1/map/floor/{id}
GET
/open-api/v1/map/floor/{id}
Request Header
Key
Value
Description
api-key
{YOUR_API_Key}
Path Parameter
Key
Value
Description
Floor ID
{YOUR_Floor_ID}
찾고자하는 Floor의 고유 ID
Response Body
{
"type": "FeatureCollection",
"features": [
{
"id": "a",
"type": "Feature",
"properties": {
"strokeWidth": null,
"fillColor": "#000000",
"fillOpacity": 0.1,
"name": "11",
"description": "description",
"id": "a",
"type": "room",
"opacity": 0.1,
"strokeColor": "#121212",
"floor": 1,
"strokeOpacity": 0.3
},
"geometry": {
"coordinates": [
[
[
126.7435671459188,
37.664528736370684
],
[
126.74333966963383,
37.66419007191247
],
[
126.74286786740095,
37.66438865516686
],
[
126.74309534368592,
37.66472731871907
],
[
126.7435671459188,
37.664528736370684
],
[
126.7435671459188,
37.664528736370684
]
]
],
"type": "Polygon"
}
},
{
"id": "L1",
"type": "Feature",
"properties": {
"strokeWidth": 1.0,
"name": null,
"id": "L1",
"type": "door",
"strokeColor": "#DD0000",
"floor": 1,
"direction": null
},
"geometry": {
"coordinates": [
[
126.74505689,
37.669756232
],
[
126.745258056,
37.669280658
],
[
126.74481415,
37.669379913
],
[
126.744604267,
37.669393183
],
[
126.744604267,
37.669393183
]
],
"type": "LineString"
}
}
]
}
cURL
curl --location 'https://space.api-freegrow.com/open-api/v1/map/floor/1' \
--header 'api-key: {YOUR_API_KEY}
Last updated