mmomtchev / rlayers

React Component Library for OpenLayers
ISC License
173 stars 36 forks source link

format problem in WMS WMTS #175

Open thanatas opened 1 year ago

thanatas commented 1 year ago

I think I got a bug;

at version @1.5.3 WMS and WMTS layers do not accept format as parameter .

In the code (RLayerWMS and RLayerWMTS) createSource() -> optionsFromCapabilities, only layer parameter is passed. Adding, format is a option parameter.

                const caps = this.parser.read(text);
                this.options = optionsFromCapabilities(caps, {
                    layer: this.props.layer
                });

In geoserver, if you enable multiple tile caching types, optionsFromCapabilities function select first one from server which is the type of json and it is not compatible with wms and wmts.

Could you check that OR WHAT am I doing wrong.

Thanks.

mmomtchev commented 1 year ago

Yes, I confirm, if you add it, I will merge the PR

thanatas commented 1 year ago

Hi again, I tried to fix and tested on local.

Unfortunately, without changing the package.json build scripts I could not build the project. If I may so, I will send a merge request.

I got the following error; I could not find what is the problem.

image

I am using windows 11, I tried nodejs 18,19,20. What is required to do so?

Thanks

mmomtchev commented 1 year ago

This is a bundler problem, what makes you think that the problem is not what it says - that iife is not supported as an output format for code-splitting builds?

mmomtchev commented 1 year ago

This is a problem when rebuilding the library for publishing on Windows, you can safely ignore it