初始化
This commit is contained in:
parent
ddbb4a123c
commit
48749020ae
@ -17,10 +17,9 @@ public interface LayerService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取地图中需要设置的图层列表
|
* 获取地图中需要设置的图层列表
|
||||||
* @param layerIdList 地图中已加入的图层编号
|
* @return
|
||||||
* @return 在图层列表基础上新增已添加标记
|
|
||||||
*/
|
*/
|
||||||
public List<MapLayer> findSimpleLayerList(List<String> layerIdList);
|
public List<Layer> findSimpleLayerList();
|
||||||
public List<java.util.Map<String,Object>> findLayersByPage(Integer pageSize,Integer currentPage);
|
public List<java.util.Map<String,Object>> findLayersByPage(Integer pageSize,Integer currentPage);
|
||||||
|
|
||||||
public Layer findeLayerById(String layerId);
|
public Layer findeLayerById(String layerId);
|
||||||
|
|||||||
@ -42,34 +42,8 @@ public class LayerServiceImpl implements LayerService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<MapLayer> findSimpleLayerList(List<String> layerIdList) {
|
public List<Layer> findSimpleLayerList() {
|
||||||
List<MapLayer> result = new ArrayList<>();
|
return layerDao.findLayerList();
|
||||||
List<Layer> layerList = layerDao.findLayerList();
|
|
||||||
MapLayer mapLayer;
|
|
||||||
Layer queryLayer;
|
|
||||||
if(layerIdList != null && layerIdList.size() > 0){
|
|
||||||
for(String layerId : layerIdList){
|
|
||||||
mapLayer = new MapLayer();
|
|
||||||
queryLayer = layerList.stream()
|
|
||||||
.filter(layer -> layer.getLayerId().equals(layerId))
|
|
||||||
.findFirst()
|
|
||||||
.orElse(null);
|
|
||||||
if(queryLayer != null){
|
|
||||||
mapLayer.setLayer(queryLayer);
|
|
||||||
mapLayer.setBinded(true);
|
|
||||||
result.add(mapLayer);
|
|
||||||
|
|
||||||
layerList.remove(queryLayer);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
for(Layer layer : layerList){
|
|
||||||
mapLayer = new MapLayer();
|
|
||||||
mapLayer.setLayer(layer);
|
|
||||||
result.add(mapLayer);
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user