국유인의타입추가

This commit is contained in:
2026-03-04 19:58:02 +09:00
parent 2fee2143ba
commit 57baf4d911
2 changed files with 22 additions and 19 deletions

View File

@@ -13,7 +13,10 @@ public enum LayerType implements EnumType {
TILE("배경지도"), TILE("배경지도"),
GEOJSON("객체데이터"), GEOJSON("객체데이터"),
WMTS("타일레이어"), WMTS("타일레이어"),
WMS("지적도"); WMS("지적도")
, KAMCO_WMS("국유인WMS")
, KAMCO_WMTS("국유인WMTS")
;
private final String desc; private final String desc;

View File

@@ -58,11 +58,11 @@ public class LayerService {
@Transactional @Transactional
public UUID saveLayers(String type, LayerDto.AddReq dto) { public UUID saveLayers(String type, LayerDto.AddReq dto) {
LayerType layerType = LayerType layerType =
LayerType.from(type) LayerType.from(type)
.orElseThrow(() -> new CustomApiException("BAD_REQUEST", HttpStatus.BAD_REQUEST)); .orElseThrow(() -> new CustomApiException("BAD_REQUEST", HttpStatus.BAD_REQUEST));
switch (layerType) { switch (layerType) {
case TILE -> { case TILE, KAMCO_WMS, KAMCO_WMTS -> {
return mapLayerCoreService.saveTile(dto); return mapLayerCoreService.saveTile(dto);
} }
@@ -169,21 +169,21 @@ public class LayerService {
public List<LayerMapDto> findLayerMapList(String type) { public List<LayerMapDto> findLayerMapList(String type) {
List<LayerMapDto> layerMapDtoList = mapLayerCoreService.findLayerMapList(type); List<LayerMapDto> layerMapDtoList = mapLayerCoreService.findLayerMapList(type);
layerMapDtoList.forEach( layerMapDtoList.forEach(
dto -> { dto -> {
if (dto.getLayerType().equals("WMS")) { if (dto.getLayerType().equals("WMS")) {
dto.setUrl( dto.setUrl(
String.format( String.format(
"%s/%s/%s", "%s/%s/%s",
trimSlash(geoserverUrl), trimSlash(wmsPath), dto.getLayerType().toLowerCase())); trimSlash(geoserverUrl), trimSlash(wmsPath), dto.getLayerType().toLowerCase()));
} else if (dto.getLayerType().equals("WMTS")) { } else if (dto.getLayerType().equals("WMTS")) {
dto.setUrl( dto.setUrl(
String.format( String.format(
"%s/%s/%s", "%s/%s/%s",
trimSlash(geoserverUrl), trimSlash(geoserverUrl),
trimSlash(wmtsPath), trimSlash(wmtsPath),
dto.getLayerType().toLowerCase())); dto.getLayerType().toLowerCase()));
} }
}); });
return layerMapDtoList; return layerMapDtoList;
} }