본문으로 건너뛰기

Layers - Point

[map 영역] Layer는 Map 영역의 시각화를 정의합니다.

필드타입필수설명기본값
sectionstringY데이터가 표출되는 영역
map
contentsobjectYGeoJson 객체
contents.geojsonobjectYGeoJson 객체
contents.geojson.typestringYFeatureCollection로 작성
contents.geojson.featuresobject[]Y도형 특성 배열
contents.geojson.features[].idstringY도형 고유 식별자
contents.geojson.features[].typestringYFeature로 작성
contents.geojson.features[].propertiesobjectN도형 속성 정보
contents.geojson.features[].geometryobjectY레이어 좌표 정보
contents.geojson.features[].geometry.typeenumY레이어 형태 타입
Point
contents.geojson.features[].geometry.coordinatesfloat[]Y레이어 좌표 배열
configobjectY기본 설정
config.typestringY지도 데이터 타입 식별자
config.idstringY지도 고유 식별자
config.optionobjectY세부 설정
config.option.layerobjectY지도의 레이어 관련 옵션을 설정
config.option.layer.namestringY레이어 이름
(레이어 on/ off 박스에서 해당 값을 기준으로 on/off 됨)
config.option.layer.visibilitybooleanN레이어 표시 여부true
config.option.layer.orderintN레이어 순서
(숫자가 높을수록 상단에 노출됨)
0
config.option.layer.pointobjectNpoint의 추가적인 옵션 설정
config.option.layer.point.typeenumNpoint 타입 marker,pointpoint
config.option.layer.point.clusterbooleanN클러스터 적용 유무true
config.option.layer.point.colNamestringNsymbol 설정의 기준이 되는 colName
config.option.layer.point.contentobject[]N마커의 symbol 설정
config.option.layer.point.content[colName]stringNicon을 적용 할 column의 값
config.option.layer.point.iconstringN마커의 icon (emoji)
config.option.layer.style[]object[]N각 레이어의 추가적인 옵션을 설정
config.option.layer.style[].idstringN속성 식별자
config.option.layer.style[].tooltipstringN툴팁
(텍스트, html, Markdown 형식으로 작성)
config.option.layer.style[].fillColorstringN채우기 색상
(투명색상: #FFFFFF26)
#DC3545 (빨간색)
config.option.layer.style[].fillOpacityfloatN채우기 투명도 (0-1)0.3
config.option.layer.style[].widthintN마커의 넓이55
config.option.legendobjectN지도의 범례 관련 옵션을 설정
(legend는 layer를 기준으로 자동 생성)
config.option.legend.visibilitybooleanN범례 노출 여부true
config.option.legend.colNamestringN범례에 사용 될 column명

Protocol 구조

{
section:"map";
contents:{
geojson: {
type: "FeatureCollection";
features:[
{
id: string,
type: "Feature",
properties:{
key: value
},
geometry: {
type: string,
coordinates: [ [number] ]
}
}
]
}
};
config:{
type: string;
id: string;
option:{
layer :{
name: string;
visibility: boolean;
order: number;
point:{
type:'point'|'marker';
cluster:boolean;
colName:string;
content:[
{
[colName]:string,
icon:string
}
]
}
style:[
{
id:string,
tooltip: string,
fillColor: string,
fillOpacity: float,
width:int
}
]
}
legend:{
visibility: boolean;
colName:string
}
}
}
}

Example

{
"section": "map",
"contents": {
"geojson": {
"type": "FeatureCollection",
"features": [
{
"id": "0",
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [
127.0501840726,
37.497306683
]
},
"bbox": [
127.0501840726,
37.497306683,
127.0501840726,
37.497306683
]
},
{
"id": "1",
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [
127.0458853307,
37.4967340022
]
},
"bbox": [
127.0458853307,
37.4967340022,
127.0458853307,
37.4967340022
]
},
{
"id": "2",
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [
127.0464199184,
37.4966924163
]
},
"bbox": [
127.0464199184,
37.4966924163,
127.0464199184,
37.4966924163
]
},
{
"id": "3",
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [
127.0459694429,
37.4965431098
]
},
"bbox": [
127.0459694429,
37.4965431098,
127.0459694429,
37.4965431098
]
},
{
"id": "4",
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [
127.0462848693,
37.4962322739
]
},
"bbox": [
127.0462848693,
37.4962322739,
127.0462848693,
37.4962322739
]
}
],
"bbox": [
127.0458853307,
37.4911319068,
127.0709959841,
37.5071617429
]
}
},
"config": {
"type": "layer",
"id": "map_layer_3",
"option": {
"layer": {
"name": "주거지역3",
"visibility": true,
"order": 0,
"style": [
{
"house_division_name": "단지형아파트",
"fillColor": "#00B4D8",
"width": 20
},
{
"house_division_name": "나홀로아파트",
"fillColor": "#FF0075",
"width": 20
},
{
"house_division_name": "오피스텔",
"fillColor": "#2EC4B6",
"width": 20
},
{
"house_division_name": "나홀로아파트",
"fillColor": "#FF0075",
"width": 20
},
{
"house_division_name": "단지형아파트",
"fillColor": "#00B4D8",
"width": 20
}
],
"point": {
"type": "marker",
"cluster": true,
"colName": "house_division_name",
"content": [
{
"house_division_name": "단지형아파트",
"icon": "🏢"
},
{
"house_division_name": "나홀로아파트",
"icon": "🏠"
},
{
"house_division_name": "오피스텔",
"icon": "🏛️"
}
]
}
},
"legend": {
"visibility": true,
"colName": "house_division_name"
}
}
}
}