POIS, with wms and openlayers

This forum deals with any kind of web based client technology, whether it is the well known java script based Ajax servlet or the upcoming approaches such as Leaflet, OpenLayers and so on.
Post Reply
Ricardo.M
Posts: 1
Joined: Mon Jul 25, 2016 1:46 pm

POIS, with wms and openlayers

Post 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?
User avatar
Oliver Heilig
Posts: 154
Joined: Tue May 13, 2014 12:10 pm
Location: Karlsruhe, Germany
Contact:

Re: POIS, with wms and openlayers

Post 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
Oliver Heilig
Chief Developer Logistic Services
PTV GROUP - Germany

https://github.com/oliverheilig/
Post Reply