3dcitydb / 3dcitydb-web-map

Cesium-based 3D viewer and JavaScript API for the 3D City Database
Apache License 2.0
377 stars 125 forks source link

WMS not loading #20

Closed Abelon38 closed 6 years ago

Abelon38 commented 6 years ago

Hi!

I have sucsessfully installed 3dcity web map on a Tomcat 9.0 and it works verty well! but I am having problems when trying to load up WMS.. I get this error: An error occurred in "WebMapServiceImageryProvider": Failed to obtain image tile X: 68 Y: 10 Level: 6.

I have fixed the CORS filter in Tomcat according to this: https://tomcat.apache.org/tomcat-9.0-doc/config/filter.html

Is there something else I should look?

Thanks a lot for your time and for this great 3D webmap!

Regards! Abel Gonzalez

yaozhihang commented 6 years ago

Hi Abel,

could check your WMS server, if it supports WMS 1.1.1? The 3dcitydb-web-map-client uses Cesium's WebMapServiceImageryProvider with its default parameter values and can hence only support WMS version 1.1.1.

Cheers

Zhihang

Abelon38 commented 6 years ago

Hi Zhihang!

Thanks for your repply! I tested on the demo version you have on GitHub and even with the js server.js that comes with the 3DcityD web-klient and and in both cases works perfect. I use WMS från QGIS srever and other from Geoserver in version 1.3.0.

It must be something with Tomcat and CORS origen maybe? Any idea? Do you know if WMS from Goewebcache should work?

Regards! Abel

2018-02-01 18:58 GMT+01:00 Zhihang Yao notifications@github.com:

Hi Abel,

could check your WMS server, if it supports WMS 1.1.1? The 3dcitydb-web-map-client uses Cesium's WebMapServiceImageryProvider with its default parameter values and can hence only support WMS version 1.1.1.

Cheers

Zhihang

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/3dcitydb/3dcitydb-web-map/issues/20#issuecomment-362349813, or mute the thread https://github.com/notifications/unsubscribe-auth/AL_kxRnNK7EgDy1xw30H9iwVWa9H648Wks5tQfs-gaJpZM4R18jz .

Abelon38 commented 6 years ago

Hi Zhihang!

This is the 3D map I am building, maybe you can try it with a working WMS link?

https://3d.sokigo.com/

2018-02-01 21:24 GMT+01:00 Abel Gonzalez abel.gonzalez.c@gmail.com:

Hi Zhihang!

Thanks for your repply! I tested on the demo version you have on GitHub and even with the js server.js that comes with the 3DcityD web-klient and and in both cases works perfect. I use WMS från QGIS srever and other from Geoserver in version 1.3.0.

It must be something with Tomcat and CORS origen maybe? Any idea? Do you know if WMS from Goewebcache should work?

Regards! Abel

2018-02-01 18:58 GMT+01:00 Zhihang Yao notifications@github.com:

Hi Abel,

could check your WMS server, if it supports WMS 1.1.1? The 3dcitydb-web-map-client uses Cesium's WebMapServiceImageryProvider with its default parameter values and can hence only support WMS version 1.1.1.

Cheers

Zhihang

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/3dcitydb/3dcitydb-web-map/issues/20#issuecomment-362349813, or mute the thread https://github.com/notifications/unsubscribe-auth/AL_kxRnNK7EgDy1xw30H9iwVWa9H648Wks5tQfs-gaJpZM4R18jz .

yaozhihang commented 6 years ago

Hi Abel,

it seems that your WMS is probably published over HTTP. Since your 3D map is a HTTPS page, the loading of contents over HTTP is blocked by your web browsers due to the "Mixed Content" issue.

You may find some solutions from this website: https://developers.google.com/web/fundamentals/security/prevent-mixed-content/what-is-mixed-content

Cheers

Zhihang

Abelon38 commented 6 years ago

Thanks for infon Zhihang!

But my wms goes on https also. Try this wms on a working demo : https://mobilkarta.vallentuna.se:444/qgis/qgis_mapserv.fcgi.exe

Layer: editor_polygon

Regards! Abel

Den 1 feb. 2018 22:11 skrev "Zhihang Yao" notifications@github.com:

Hi Abel,

it seems that you WMS is probably published over HTTP. Since your 3D map is a HTTPS page, the loading of contents over HTTP is blocked by your web browsers due to the "Mixed Content" issue.

You may find some solutions from this website: https://developers.google.com/web/fundamentals/security/ prevent-mixed-content/what-is-mixed-content

Cheers

Zhihang

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/3dcitydb/3dcitydb-web-map/issues/20#issuecomment-362403037, or mute the thread https://github.com/notifications/unsubscribe-auth/AL_kxQkzB2sx8plcEXaFfQ0WafsEKdA8ks5tQiiMgaJpZM4R18jz .

Abelon38 commented 6 years ago

Hi again Zhihang!

I just tried on tomcat 8.5 and with http://localhost:8080/xxx and the same problem continues. I do can get it working only with the server.js that comes with the client. This the error I get on Chrome tools for developers:

Request URL:https://3d.sokigo.com/proxy/?http%3A%2F%2Fqgis.nacka.se%3A8050%2Fqgis%2Fqgis_mapserv.fcgi.exe%3Fservice%3DWMS%26version%3D1.1.1%26request%3DGetMap%26styles%3D%26format%3Dimage%252Fjpeg%26layers%3DBakgrund%26srs%3DEPSG%253A4326%26bbox%3D18.1658935546875%252C59.30969238281251%252C18.17138671874999%252C59.315185546875%26width%3D256%26height%3D256 Request Method:GET Status Code:404 Remote Address:62.181.194.207:443 Referrer Policy:no-referrer-when-downgrade content-length:1245 content-type:text/html date:Tue, 06 Feb 2018 19:04:06 GMT server:Microsoft-IIS/10.0 status:404 x-powered-by:ASP.NET

Please note that content-type:text/html and it should be content-type:image/jpeg

Any idea will be appreciated !

Regards! Abel

yaozhihang commented 6 years ago

Hi Abel, could you check your WMS server configuration? I cannot access the server with the following WMS-GetCapabilities request http://qgis.nacka.se:8050/qgis/qgis_mapserv.fcgi.exe?service=wms&version=1.1.1&request=GetCapabilities

Abelon38 commented 6 years ago

Hi ! It should work by using http://qgis.nacka.se:8050/ qgis/qgis_mapserv.fcgi.exe? http://qgis.nacka.se:8050/qgis/qgis_mapserv.fcgi.exe?service=wms&version=1.1.1&request=GetCapabilities Only

And then layer: Bakgrund . This is background layer of the Nacka municipality in Sweden

Thanks for your time Zhihang! Regards! Abel

Den 6 feb. 2018 21:54 skrev "Zhihang Yao" notifications@github.com:

Hi Abel, could you check your WMS server configuration? I cannot access the server with the following WMS-GetCapabilities request http://qgis.nacka.se:8050/qgis/qgis_mapserv.fcgi.exe? service=wms&version=1.1.1&request=GetCapabilities

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/3dcitydb/3dcitydb-web-map/issues/20#issuecomment-363561483, or mute the thread https://github.com/notifications/unsubscribe-auth/AL_kxWF-Yl4wDJSm3KvYEOOejoxLpE9Kks5tSLwUgaJpZM4R18jz .

yaozhihang commented 6 years ago

sorry, the link doesn't work. Here is the error message produced on my web browser.

Abelon38 commented 6 years ago

Hi Zhihang!

The link is working well. you can see it on here:

http://www.3dcitydb.org/3dcitydb-web-map/1.4/3dwebclient/index.html?title=Railway_Scene_LoD3_Demo&shadows=false&terrainShadows=0&latitude=59.307805291006275&longitude=18.145697445631225&height=4305.180324223145&heading=0.000642000301205277&pitch=-89.99995988172236&roll=0&layer_0=url%3Dhttp%253A%252F%252Fwww.3dcitydb.net%252F3dcitydb%252Ffileadmin%252Fmydata%252FRailway_Scene_LoD3%252FRailway_Scene_LoD3_collada_MasterJSON.json%26name%3DRailway_Scene_LoD3%26active%3Dtrue%26spreadsheetUrl%3D%26cityobjectsJsonUrl%3D%26minLodPixels%3D140%26maxLodPixels%3D1.7976931348623157e%252B308%26maxSizeOfCachedTiles%3D50%26maxCountOfVisibleTiles%3D200&basemap=name%3Dbakgrund%26iconUrl%3D%26tooltip%3D%26url%3Dhttp%253A%252F%252Fqgis.nacka.se%253A8050%252Fqgis%252Fqgis_mapserv.fcgi.exe%253F%26layers%3DBakgrund%26additionalParameters%3D%26proxyUrl%3D%252Fproxy%252F

As I said, I think the problem in on the server configuration. As soon as you use the 3Dcity webmap under Tomcat, Apache HTTP, http-server or direct under IIS, the webmap will be unable to read WMS. I have tested including anabling CORS with out results. the only alternativ I can see is to use the server.js that comes with the webclient. In this case it would fabulows if you have documentation on how to connect my DNS alias to this server?

Thanks for your time!

Regads Abel

2018-02-07 22:29 GMT+01:00 Zhihang Yao notifications@github.com:

sorry, the link doesn't work. Here is the error message produced on my web browser. https://github.com/yaozhihang/dummy/blob/master/Clipboard01.png?raw=true

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/3dcitydb/3dcitydb-web-map/issues/20#issuecomment-363916988, or mute the thread https://github.com/notifications/unsubscribe-auth/AL_kxYfN7wIDUoTZm1ORSgRo3YihwiM3ks5tShXBgaJpZM4R18jz .

yaozhihang commented 6 years ago

OK, i see the issue and make a fix. You can find and check out the new commit from this Github-Repo. You can now deploy the 3D web map using Tomcat and Apache etc. After launching the map, In the 'add WMS-Layer' panel, you just need to remove the ''/proxy/' text from the input field proxyUrl, keep the other WMS parameter values as it was, and load the your WMS layer again. It should work now.

Abelon38 commented 6 years ago

Now is working!

Thank you so much Yao! 😃

Have a great day!

Regards, Abel

2018-02-08 11:10 GMT+01:00 Zhihang Yao notifications@github.com:

OK, i see the issue and make a fix. You can find and check out the new commit from this Github-Repo. You can now deploy the 3D web map using Tomcat and Apache etc. After launching the map, In the 'add WMS-Layer' panel, you just need to remove the ''/proxy/' text from the input field proxyUrl, keep the other WMS parameter values as it was, and load the your WMS layer again. It should work now.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/3dcitydb/3dcitydb-web-map/issues/20#issuecomment-364063905, or mute the thread https://github.com/notifications/unsubscribe-auth/AL_kxXsIRXfDy2cX1IZzCG6SZPs2dXzDks5tSsgAgaJpZM4R18jz .

yaozhihang commented 6 years ago

Good, you're welcome.