Tag Info

New answers tagged

0

You could try the OGR WFS option "-dsco OGR_WFS_PAGING_ALLOWED=ON" as described in the docs http://www.gdal.org/drv_wfs.html


0

If GeoServer is served under a different domain to your page then you will need to either enable CORS on the GeoServer application server or enable JSONP requests in GeoServer and update your OL3 app to send JSONP requests. Some of this is covered here under "Cross-domain requests": http://astuntechnology.github.io/osgis-ol3-leaflet/ol3/03-GEOJSON-INFO.html ...


0

I agree with Kyle. Even a year later it took me a while to find good examples with explanation which can be easily reproduced. I do like the examples from the 'the book of openlayers 3'. Unfortunately I do not have access to the book itself but I believe it to be well written judging from the examples. This example is for ol 3.4 ...


0

Kaarel´s answer should be marked as the correct answer. You need to call the loadFeatures function from the AJAX call. I created three jsfiddle to demonstrate ol 3.5.0 calls via AJAX for ol.format.GeoJSON (JSON and JSONP) as well as ol.format.WFS. WFS http://jsfiddle.net/goldrydigital/9d3jzpna/ JSON http://jsfiddle.net/goldrydigital/ucspgvx0/ JSONP ...


0

The problem is that the success function is not called with the JSONP call. You need to change the AJAX call accordingly. You need to set jsonp:'format_options' on the AJAX call. The callback is then in the jsonpCallback parameter. $.ajax('http://demo.opengeo.org/geoserver/wfs',{ type: 'GET', data: { service: 'WFS', ...


0

After a bit of tinkering with my program I've managed to pull the Layer name and its elements/variables! See code below on how to do it :) void main() { // Register your drivers OGRRegisterAll(); // Get your wfs here - (M_DATASOURCE IN HEADER) m_datasource = OGRSFDriverRegistrar::Open(m_ui->m_line_wfs_name->text().toStdString().c_str(), ...


0

The solution is described here http://osgeo-org.1560.x6.nabble.com/How-to-use-filter-encoding-in-MapServer-in-a-WFS-query-td5205424.html. It seems that is an old problem with int considered as string and the solution is really to use PropertyIsLike operator instead of the PropertyIsEqual but be careful about the sintax .... Here you're a couple examples ...


0

You can access the number of features in the cluster strategy object. If there were no more strategies added to the layer, the correct path to the array is the following: mylayer.strategies[1].features


0

Check for ExceptionReport in the XML response. http://www.ogcnetwork.net/node/198


0

Thank you very much for your answer, Gabor. I tried applying the code you mentioned, but I can not make it work. This is the javascript code that I have created: proj4.defs('EPSG:1000', "+proj=lcc +lat_1=14.25 +lat_2=13.3166667 +lat_0=13.783333333333333 +lon_0=-89 +x_0=500000.00004 +y_0=295809.17715 +k_0=0.999967040229754 +a=6378206 +rf=294.9786982138982 ...



Top 50 recent answers are included