Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating WMS url breaks createTileUrlFunction #357

Closed
scadergit opened this issue Sep 25, 2020 · 5 comments
Closed

Updating WMS url breaks createTileUrlFunction #357

scadergit opened this issue Sep 25, 2020 · 5 comments
Assignees
Labels

Comments

@scadergit
Copy link

scadergit commented Sep 25, 2020

Here is a working example. Click the link to update the station which change the url of the WMS source.
https://codesandbox.io/s/relaxed-wright-m2h87

After issue #248 was resolved, the javascript error is gone, but changing the url now causes invalid urls to be sent to the geospacial service. The url is missing all the parameters needed for the service.

An example before changing the source url:
https://opengeo.ncep.noaa.gov/geoserver/krax/ows?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=true&LAYERS=krax_bref_raw&WIDTH=256&HEIGHT=256&CRS=EPSG%3A3857&BBOX=-10018754.171394622%2C5009377.085697312%2C-8766409.899970295%2C6261721.35712164

An example after changing the source url:
https://opengeo.ncep.noaa.gov/geoserver/kakq/ows

This does not impact initial load because the watch in tile-source.js for urlFunc does not trigger immediately. When the watch does trigger on change of this.url, the call to setTileUrlFunction results in requests that no longer include parameters.

@scadergit
Copy link
Author

Note that you might not see the radar on the map even before click if there is no rain near DC. If you click the link to change stations you'll still see the invalid requests in the developer tools Network tab.

@ghettovoice ghettovoice self-assigned this Sep 29, 2020
@ghettovoice
Copy link
Owner

Hello @scadergit ,
thanks for report.

I need some time to publish patch...

@scadergit
Copy link
Author

Thanks, appreciate your effort on this library. It is being used in the new version of the National Weather Service radar application (preview at: https://preview-radar.weather.gov).

ghettovoice added a commit that referenced this issue Sep 29, 2020
@ghettovoice
Copy link
Owner

@scadergit upgrade pls. It should now work correctly.

It is being used in the new version of the National Weather Service radar

nice 👍

@scadergit
Copy link
Author

Works great, thanks for the quick fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants