Page 1 of 1

POIS, with wms and openlayers

Posted: Mon Jul 25, 2016 2:34 pm
by Ricardo.M
Hello,
I will show pois with wms and openlayers, but I have a problem such as hospitals show.

Example all pois:

var wms = new OpenLayers.Layer.WMS("xmap",
"http://192.168.1.249:50010/WMS/WMS?xtok=mytoken",
{
layers: 'xmap-poi',
transparent: true,
format: 'image/gif'

}, {
opacity: 0.9,
singleTile: true
});

How would only show hospitals for example?

Re: POIS, with wms and openlayers

Posted: Mon Jul 25, 2016 3:01 pm
by Oliver Heilig
Hi Ricardo,

it's not possible to pass additional parameters with the WMS adapter. What you can do:

* If you run an on-premise xServer and want to support a pre-defined set of filters, you can add a template 'xmap-poi-hospitals' to the wms.properties file. This provides a new WMS-layer then.
* If you just want to use OpenLayers or Leaflet via WMS, you can implement a WMS proxy in your middleware that translates WMS-requests to xMap-requests and use this proxy for the Web-Client. There you can also pass additional parameters, like a filter. But this would depend on the middleware technology you are using (ASP,JSP,PHP,...).

Regards
Oliver