19-0721-0727周总结
0724
- openlayers中地图的容器div先被隐藏后被显示,此时需要调用setTimeout进行map.updateSize();
- 惰性单例模式的封装;
- 图层加载时的状态监听:
const wmsLayerSource = new ol.source.ImageWMS(
Object.assign(defaultOption, option)
);
wmsLayerSource.on('imageloadstart', function() {
console.log('imageloadstart')
});
wmsLayerSource.on('imageloadend', function() {
console.log('imageloadend')
});
0725
- geoserver中配置sld导致无法预览的原因是:geoserver读取的属性名全部为小写,而qgis生成的sld中的字段名存在大写,大小写不一致就会导致无法预览图层的情况;
- 请求图例的方式:
http://localhost:8080/geoserver/wms?REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=100&HEIGHT=100&LAYER=cite:indexmap_kg&STYLE=cite:xzq
- arcgis请求图例分别有html和json两种方式,且json方式返回的是base格式:
http://172.30.3.201:6080/arcgis/rest/services/JSYDSP_TDGY1/MapServer/legend
0726
- c#中,获取webconfig的连接字符串:
ConnectionStringSettings cs = ConfigurationManager.ConnectionStrings["postgresql"];
string conStr = cs.ConnectionString;