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

WMS viewer JS error #41

Closed
bunnis opened this issue May 2, 2016 · 15 comments
Closed

WMS viewer JS error #41

bunnis opened this issue May 2, 2016 · 15 comments

Comments

@bunnis
Copy link

bunnis commented May 2, 2016

When trying to view a WMS resource, using http://services.arcgisonline.com/arcgis/rest/Demographics/USE_Population_Density/MapServer/WMTS or other public wms

Uncaught TypeError: Cannot read property 'layers' of undefined(anonymous function) @ ol2_preview.js:5198OpenLayers.Request.GET.success @ ol2_preview.js:5043OpenLayers.Util.extend.runCallbacks @ ol2_preview.js:1871request.onreadystatechange @ ol2_preview.js:1867cXMLHttpRequest.dispatchEvent @ ol2_preview.js:1901fReadyStateChange @ ol2_preview.js:1904_object.onreadystatechange @ ol2_preview.js:1887
@pduchesne
Copy link

The service you are trying to use is a WMTS (tiling service), not a WMS.
The generic OpenLayers viewer you are using does not currently support the WMTS standard.

There's a leaflet-based WMTS plugin (named 'wmts_view') you can try.

@bunnis
Copy link
Author

bunnis commented May 2, 2016

I thought they were the same! The plugin didn't automatically added the view, so I manually added WMS as teh resource type. Ill tried it out, from WMS to WMTS and i got a 409 error, but I guess that is from the server! thank you

@bunnis bunnis closed this as completed May 2, 2016
@bunnis
Copy link
Author

bunnis commented May 2, 2016

Trying to use a WMS service (http://maps.ipma.pt/mapserv?map=/var/www/maps/forecasts/meteorology/arome_pt_2_10uv.map) produces the same error

@bunnis bunnis reopened this May 2, 2016
@pduchesne
Copy link

Right, that's likely the service proxy that dumps the 'map' parameter when proxying the capabilities.
FYI, that's specific to mapserver implementations.
Will look into fixing that.

@drnextgis
Copy link

It looks like duplicate of #32

@drnextgis
Copy link

I've made PR #42, please review it.

@pduchesne
Copy link

Thank you Denis, will merge, and apologizes for overlooking your fix.

@amercader
Copy link
Member

Ups sorry @pduchesne I didn't saw you were meaning to review and merge #42

@pduchesne
Copy link

no worry, thank you @amercader .

One comment on this fix : stripping parameters in the js lib was on purpose, in the case where OGC services are registered with URL parameters like service, version, request, ... In that case, not stripping the parameters at all may cause such resources to fail being displayed.
I'll look into a "smart" stripping strategy.

@drnextgis
Copy link

@bunnis can we close this issue?

@bunnis
Copy link
Author

bunnis commented May 4, 2016

Did this get fixed? I see you guys talk about merging PR but nothing got merged, so this issue's still open, right?

@drnextgis
Copy link

drnextgis commented May 4, 2016

No, PR was merged: 1e11211

@bunnis
Copy link
Author

bunnis commented May 4, 2016

Ok! Thanks for the clarification.

@bunnis bunnis closed this as completed May 4, 2016
@drnextgis
Copy link

@bunnis, are these changes solves your original issue?

@bunnis
Copy link
Author

bunnis commented May 4, 2016

Just Tested and they do work, thank you

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

No branches or pull requests

4 participants