레이어 관리 api 추가
This commit is contained in:
@@ -22,6 +22,7 @@ public class WmtsDto {
|
||||
@NoArgsConstructor
|
||||
public static class WmtsAddDto {
|
||||
private WmtsLayerInfo wmtsLayerInfo;
|
||||
private String title;
|
||||
private String description;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ package com.kamco.cd.kamcoback.layer.service;
|
||||
import com.kamco.cd.kamcoback.layer.dto.WmtsDto.WmtsAddDto;
|
||||
import com.kamco.cd.kamcoback.layer.dto.WmtsDto.WmtsAddReqDto;
|
||||
import com.kamco.cd.kamcoback.layer.dto.WmtsLayerInfo;
|
||||
import com.kamco.cd.kamcoback.postgres.core.MapLayerCoreService;
|
||||
import java.net.URL;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
@@ -26,6 +27,8 @@ import org.w3c.dom.NodeList;
|
||||
@Transactional(readOnly = true)
|
||||
public class WmtsService {
|
||||
|
||||
private final MapLayerCoreService mapLayerCoreService;
|
||||
|
||||
@Value("${layer.geoserver-url}")
|
||||
private String geoserverUrl;
|
||||
|
||||
@@ -62,11 +65,12 @@ public class WmtsService {
|
||||
WmtsAddDto addDto = new WmtsAddDto();
|
||||
addDto.setWmtsLayerInfo(info);
|
||||
addDto.setDescription(dto.getDescription());
|
||||
addDto.setTitle(dto.getTitle());
|
||||
mapLayerCoreService.save(addDto);
|
||||
}
|
||||
|
||||
public WmtsLayerInfo getDetail(String tile) {
|
||||
WmtsService wmtsService = new WmtsService();
|
||||
return wmtsService.getLayerInfoByTitle(geoserverUrl, workspace, tile);
|
||||
return getLayerInfoByTitle(geoserverUrl, workspace, tile);
|
||||
}
|
||||
|
||||
private List<WmtsLayerInfo> getAllLayers(String geoserverUrl, String workspace) {
|
||||
|
||||
Reference in New Issue
Block a user