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 not shown #53

Closed
lgoltz opened this issue May 27, 2019 · 4 comments

Comments

Projects
2 participants
@lgoltz
Copy link

commented May 27, 2019

We are trying to include the mapfx component in a project and have some problems to integrate a WMS layer.

Tested with version:

  • mapfx 1.26.0
  • mapfx-demo: 1.26.0
  • Java: Oracle JRE 1.8.0_131
  • MVN 3.6.0

In the Controller of the mapfx-demo we changed (same WMS as in #25)

-    private WMSParam wmsParamWFPAdminBoundaries = new WMSParam()
-            .setUrl("http://geonode.wfp.org:80/geoserver/ows")
-            .addParam("layers", "geonode:admin_2_gaul_2015");
+    private WMSParam wmsParamWFPAdminBoundaries = new WMSParam().setUrl("http://ows.terrestris.de/osm/service?").addParam("layers", "OSM-WMS");

and started the demo with mvn clean package && (cd target/mapjfx-demo && ./bin/mapjfx-demo). Selecting the map style 'WMS World Food Programme admin boundaries' results in an empty (gray) map.

Using version 1.21.0 of mapfx the WMS layer is shown.

Is this a bug or a misconfiguration on our side?

Furthermore the configured WMS ("http://geonode.wfp.org:80/geoserver/ows") does not work for me in both mapfx versions.

@sothawo sothawo added the bug label May 27, 2019

@sothawo

This comment has been minimized.

Copy link
Owner

commented May 27, 2019

version 1.22.0 introduced the possibility to set the projection for the map. Although the OpenLayers API for TileWMS shows the projection property, this seems not to work with the WMS source. I am no specialist for different Geo server types like WMS, so I cannot say if the server needs to support this as well.

I'm not sure how to handle this. I could remove the projection attribute from the WMS Tile object and log a warning, when a WMS server is selected, that custom projections are not used for WMS tiles.

@sothawo

This comment has been minimized.

Copy link
Owner

commented May 27, 2019

I think I will log a warning if the map is initialized with a custom projection and the user switched to WMS that custom projectiosn are not supported for WMS servers.

I do not have the time to dig deeper into this and find out if it possible to have custom projections on WMS servers, and this solution would at least get it working again for the normal projection.

@sothawo sothawo added this to To do in mapjfx May 27, 2019

@sothawo sothawo self-assigned this May 27, 2019

@lgoltz

This comment has been minimized.

Copy link
Author

commented May 28, 2019

Thank you for your promt reply! This is fine for us (otherwise we check if we can implement this enhancement and create a pull request).

@sothawo sothawo moved this from To do to In progress in mapjfx May 28, 2019

@sothawo sothawo moved this from In progress to Done in mapjfx May 28, 2019

@sothawo sothawo closed this May 28, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.