Hello there,

I loaded my WMS layers that I have created in Geoserver in Openlayers. I
have 5 layers and only the first one that I have loaded get to Identify.
The rest of the other layers the popup shows up empty.

I did some research and found this code to be the solution

map.on('click', function (evt) {
    var url = wms_layer.getSource().getGetFeatureInfoUrl(
        evt.coordinate, viewResolution, viewProjection,
                'INFO_FORMAT': 'text/html',

I changed the code accordingly but now I am getting an error on this line

'INFO_FORMAT': 'text/html',

It is says in chrome Uncaught Syntax Error Unexpected token:

Mozilla firefox says the character encoding of the Html document is not

So now I am have been trying to figure out how to declare the encoding in
Openlayers and I cannot seem to get that right. Can someone please advise
if I am heading the right path and refer some codes/tutorials for me to try
and figure out the solution.

Many thanks.

Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
- Earning your support instead of buying it, but Ian Turton: 
- The GeoServer user list posting guidelines: 

If you want to request a feature or an improvement, also see this: 


Reply via email to