지도 레이어 추가
This commit is contained in:
@@ -77,19 +77,6 @@ GisOlLayer.prototype = {
|
||||
let lyrTyNm = options.lyrTyNm;
|
||||
let typename = this.storageNm + lyrTyNm;
|
||||
|
||||
if(options.lyrTyNm == "om_dt_untrt_swg_rain" //중점우수토실
|
||||
|| options.lyrTyNm == "om_wqlt_station" //관측소
|
||||
|| options.lyrTyNm == "tb_wr_bdst_ruse_fclt" //재이용시설
|
||||
|| options.lyrTyNm == "tb_wr_rnwtr_utztn_fclt" //빗물이용시설
|
||||
|| options.lyrTyNm == "tb_wr_rswtr_fclt" //중수도시설
|
||||
|| options.lyrTyNm == "tb_wr_htdfl_fclt" //온배수시설
|
||||
|| options.lyrTyNm == "tb_wr_tmpr_dmd_co" //잠재수요처
|
||||
)
|
||||
{
|
||||
url = GisApp.SN_GEOSERVER_URL;
|
||||
typename = lyrTyNm;
|
||||
}
|
||||
|
||||
const params = {};
|
||||
params['TYPENAME'] = typename;
|
||||
params['SERVICE'] = 'WFS';
|
||||
@@ -97,16 +84,23 @@ GisOlLayer.prototype = {
|
||||
params['REQUEST'] = 'GetFeature';
|
||||
params['SRS'] = toProj;
|
||||
params['OUTPUTFORMAT'] = 'application/json';
|
||||
if (options?.flterSql && options?.flterSql?.trim() !== 'null') {
|
||||
params['CQL_FILTER'] = options?.flterSql;
|
||||
}
|
||||
const strParams = new URLSearchParams(params).toString();
|
||||
|
||||
let source = new VectorSource({
|
||||
format: new GeoJSON(),
|
||||
url: function (extent) {
|
||||
|
||||
const [minX, minY, maxX, maxY] = extent;
|
||||
const bboxFilter = `BBOX(geom, ${minX}, ${minY}, ${maxX}, ${maxY}, '${toProj}')`;
|
||||
const filter = options?.flterSql && options.flterSql && options.flterSql.trim() !== ''
|
||||
? `(${options.flterSql}) AND ${bboxFilter}`
|
||||
: bboxFilter;
|
||||
|
||||
params['CQL_FILTER'] = filter;
|
||||
|
||||
const strParams = new URLSearchParams(params).toString();
|
||||
return url + '?' + strParams;
|
||||
},
|
||||
strategy: all,
|
||||
strategy: bbox,
|
||||
});
|
||||
return source;
|
||||
},
|
||||
@@ -212,7 +206,7 @@ GisOlLayer.prototype = {
|
||||
return null;
|
||||
}
|
||||
let vectorSource = new VectorSource({
|
||||
strategy: all,
|
||||
strategy: bbox,
|
||||
});
|
||||
if (feature) {
|
||||
if (Object.prototype.toString.call(feature).slice(8, -1).indexOf('Object') > -1) {
|
||||
|
||||
Reference in New Issue
Block a user