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',
'QUERY_LAYERS':
'HissarFullData:block_boundary,HissarFullData:habitations,HissarFullData:pwd'
});
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
declared.
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.
Regards
Amelia
--
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
list:
- Earning your support instead of buying it, but Ian Turton:
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines:
http://geoserver.org/comm/userlist-guidelines.html
If you want to request a feature or an improvement, also see this:
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users