load geoserver wms through ol/source/ImageWMS, after webpack does't work
See original GitHub issueimport OLLayerTile from 'ol/layer/Tile.js';
import OLLayerImage from 'ol/layer/Image.js';
import OLSourceImageWMS from "ol/source/ImageWMS";
import OLSourceTileWMS from "ol/source/TileWMS";
const exports = {};
exports.GeoServerTiled=function (visiable,url) {
return new OLLayerTile({
title: 'geoserver wms',
visible:visiable,
source: new OLSourceTileWMS({
projection: 'EPSG:4326',
crossOrigin: 'anonymous',
params: {'LAYERS': 'xxx'},
url: url
})
});
}
exports.GeoServerUntiled=function (visiable,url) {
return new OLLayerImage({
title: 'geoserver wms',
visible:visiable,
source: new OLSourceImageWMS({
projection: 'EPSG:4326',
crossOrigin: 'anonymous',
params: {'LAYERS': 'xxx'},
url: url
})
});
}
export default exports;
I use the GeoServerTiled method all works.
But I use GeoServerUntiled I debug in es6 envirement, 2d or 3d it all works. but, after webpack 2d work, but 3d does’t work.
Is the reason webpack problem or something else? Any help thank u.
ol version:5.3.0 cesium version:1.64 ol-cesium:2.9.0
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
GeoServer WMS layer won't load on OpenLayers 5
shp in a PostGIS database using shp2pgsql, then imported the db into GeoServer; the layer works fine with the preview provided by GeoServer....
Read more >openlayers - Bountysource
load geoserver wms through ol/source/ImageWMS, after webpack does't work $ 0 ... WMS Layer doesn't work well in ol-cesisum 3d when set projection...
Read more >WMS Layer not rendered properly on all zoom levels
The layers are displayed properly in GeoServer itself and when add them to qGIS. I use this setup and code for other layers...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, anyone solved their issue? Having the same problem in a webpack setup. It’s a node project and importing ol-cesium/cesium like this:
import OLCesium from 'olcs/OLCesium'; import * as Cesium from 'cesium'; window.Cesium = Cesium;
Map resolutions like this:"resolutions": [ 156543.03, 78271.52, 39135.76, 19567.88, 9783.94, 4891.97, 2445.98, 1222.99, 611.50, 305.75, 152.87, 76.437, 38.219, 19.109, 9.5546, 4.7773, 2.3887, 1.1943, 0.5972 ],
The map is based on openlayers 6.5.0 and using ol-cesium 2.13.0/cesium 1.84.0 for 3d. Background map is openstreetmap and renders properly. GeoJSON also renders properly in 3d. When it comes to WMS it doesnt render in 3d view, only in 2d view. Projection EPSG:3857 without any reprojections in client. When requesting a WMS service in 3d view the response is 200 and the images are there in the response but they does not show in viewer.
@gberaudo Have not been able to fix this, you might have suggestion on how to proceed? This is the request response in 2D view And this is response in 3D view