I am still working on geting multiple layers to identify on OpenLayers 4.
Currently I am getting an Error WMS does not permit cross origin framing (firefox) and chrome says Resource interpreted as Document but transferred with MIME type application/xml. I strongly believe this has to do with the way I have sent the request to Geoserver. I have been reading on WMS getfeature info but I cannot put out the correct code or how to set GetFeature info paramaters in the code. I know where to find information such as services,bbox on individual WMS urls. Perharps someone can point me to a code to set WMS get feature info parameters request.
Here is my current code
map.on(‘click’, function (evt) {
var url = GetFeatureInfoUrl = ‘http://localhost:8080/geoserver/County/wms’
‘evt.coordinate’, ‘viewResolution’, ‘viewProjection’, ‘EPSG:3857’,
{‘INFO_FORMAT’: ‘text/html’,
‘QUERY_LAYERS’: ‘County:Boundary,County:Regions,County:Constituencies,County:Towns’};
if (url) {
document.getElementById(‘info’).innerHTML =
content.innerHTML = ‘’;
}
});
Filling in some of those headers is a matter of configuring the application server. Are you using tomcat application server, or the default ‘jerry’ application server we provide with the standalone geoserver application.
Filling in some of those headers is a matter of configuring the application server. Are you using tomcat application server, or the default ‘jerry’ application server we provide with the standalone geoserver application.
I am still working on geting multiple layers to identify on OpenLayers 4.
Currently I am getting an Error WMS does not permit cross origin framing (firefox) and chrome says Resource interpreted as Document but transferred with MIME type application/xml. I strongly believe this has to do with the way I have sent the request to Geoserver. I have been reading on WMS getfeature info but I cannot put out the correct code or how to set GetFeature info paramaters in the code. I know where to find information such as services,bbox on individual WMS urls. Perharps someone can point me to a code to set WMS get feature info parameters request.
Here is my current code
map.on(‘click’, function (evt) {
var url = GetFeatureInfoUrl = ‘http://localhost:8080/geoserver/County/wms’
‘evt.coordinate’, ‘viewResolution’, ‘viewProjection’, ‘EPSG:3857’,
{‘INFO_FORMAT’: ‘text/html’,
‘QUERY_LAYERS’: ‘County:Boundary,County:Regions,County:Constituencies,County:Towns’};
if (url) {
document.getElementById(‘info’).innerHTML =
content.innerHTML = ‘’;
}
});
Thank you all for your assistance.
Best 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:
Have you tried hand-crafting a WFS GetFeatureInfo request and sending that directly from your browser manually? Using the browser’s dev tools you’ll then see if you get the headers/etc you need back. That will indicate if the issue is with the GeoServer/Tomcat side, or the OpenLayers end making a bad request.
Cheers,
Jonathan
···
On 2018-07-04 08:01, Nauwanga Nauwanga wrote:
Dear Jody
I am using Tomcat,I tried uncomenting the CORS Filter in the xml using the // but still did not take away the error?
Filling in some of those headers is a matter of configuring the application server. Are you using tomcat application server, or the default ‘jerry’ application server we provide with the standalone geoserver application.
I am still working on geting multiple layers to identify on OpenLayers 4.
Currently I am getting an Error WMS does not permit cross origin framing (firefox) and chrome says Resource interpreted as Document but transferred with MIME type application/xml. I strongly believe this has to do with the way I have sent the request to Geoserver. I have been reading on WMS getfeature info but I cannot put out the correct code or how to set GetFeature info paramaters in the code. I know where to find information such as services,bbox on individual WMS urls. Perharps someone can point me to a code to set WMS get feature info parameters request.
Here is my current code
map.on(‘click’, function (evt) {
var url = GetFeatureInfoUrl = ‘http://localhost:8080/geoserver/County/wms’
‘evt.coordinate’, ‘viewResolution’, ‘viewProjection’, ‘EPSG:3857’,
{‘INFO_FORMAT’: ‘text/html’,
‘QUERY_LAYERS’: ‘County:Boundary,County:Regions,County:Constituencies,County:Towns’};
if (url) {
document.getElementById(‘info’).innerHTML =
content.innerHTML = ‘’;
}
});
Thank you all for your assistance.
Best 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:
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! [http://sdm.link/slashdot](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#/](http://www.ianturton.com/talks/foss4g.html#/)
- The GeoServer user list posting guidelines: [http://geoserver.org/comm/userlist-guidelines.html](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](https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer)
[Geoserver-users@lists.sourceforge.net](mailto:Geoserver-users@anonymised.comsourceforge.net)
[https://lists.sourceforge.net/lists/listinfo/geoserver-users](https://lists.sourceforge.net/lists/listinfo/geoserver-users)