Closed gioman closed 7 years ago
Unchecking the "Use view CRS for WFS connections" option does not seems to help.
Apparently this is not only limited to Mapserver and QGIS Server as I was able to replicate with Geoserver (a testing endpoint from a Geonode 2.4 installation).
The Geoserver demo endpoint that works for me is
http://demo.geo-solutions.it/geoserver/wfs
I can provide privately the demo Geoserver endpoint that does not work for me.
I tried to:
import into the demo Geoserver endpoint a layer from postgis or shapefile, in different CRSs, and publish it via WFS
add it to QGIS project and generate weapp with WAB
the result is always the same, layer added to layers list but not on map.
FYI just downloaded and started a local instance of Geoserver
http://geoserver.org/release/stable/
added a WFS from the ones available out of the box, still no dice.
You need to enable CORS headers, the GeoSolutions geoserver has CORS enabled
Access-Control-Allow-Origin:*
You need to enable CORS headers, the GeoSolutions geoserver has CORS enable
I just noticed that by enabling JSONP on my local Geoserver instance makes it work. But this raises another question... why the "use JSONP for WFS connections" option then?
Maybe some admins don't allow you to enable CORS, but they do allow you to use JSONP
Maybe some admins don't allow you to enable CORS, but they do allow you to use JSONP
it seems to me very likely that a user will try to add a WFS layer from a server that has not enabled CORS and JSONP, so he/she will disable the "use JSONP for WFS connections" option, get no errors/warnings from WAB plugin and then generate a webapp where such layers will show in layer list but not on map. In addition to documenting this (which maybe is already done, but cannot find it now) the plugin should warn clearly the users (in order to try avoid have a lot of users complain about it).
@volaya the docs and warning is that something you can work on? @gioman normally people will deploy the webapp next to their geoserver, so that it is a relative url, and CORS or JSONP is not needed in the production environment. There is also a plugin for Chrome to disable the security: https://chrome.google.com/webstore/detail/allow-control-allow-origi/nlfbmbojpeacfghkpbjhddihlkkiljbi?hl=en maybe we can point users to this as well for preview mode
I enabled CORS in Apache in my local QGIS Server test endpoint. Published a few layers as WFS and added them to a QGIS project to publish them using WAB. Still those layers will show in layer list but not on the map.
@gioman normally people will deploy the webapp next to their geoserver, so that it is a relative url, and CORS or JSONP is not needed in the production environment.
I just (re)tested this scenario (I think): weabpp published with Apache, Geoserver on the same server, no JSONP, no CORS, no WFS layer on map, layer name visible in layer list.
then there must be something else going on, is there nothing in the console?
CORS is checked before the app is created, but only if there are popups. Is it needed in any case, just for fetching the layer data?
I correct: it's is checked for WMS layers, if they have popups enabled. It's not checked for WFS ones. Should i check them and warn users if the server doesnt have CORS enabled and not using JSONP?
then there must be something else going on, is there nothing in the console?
just a long list of requests, all "200 OK".
and they have the expected content? Can you log a request and the response of one request that has features?
So my test project is in epsg 3857, I added a geoserver WFS layer in WGS84.
With the option "Use view CRS for WFS connections" checked
_{"type":"FeatureCollection","totalFeatures":0,"features":[],"crs":null}__
and this is kind of expected (at least regarding the number of features retrieved) as the WFS is only retrievable in 4326. My suggestion is to add a warning/error message if the project contains a WFS layer that has not the same CRS as the project and the "Use view CRS for WFS connections" is checked.
If "Use view CRS for WFS connections" is not checked then
and the answer contains features indeed (see below), but still no layer on map
_{"type":"FeatureCollection","totalFeatures":5,"features":[{"type":"Feature","id":"states.6","geometry":{"type":"MultiPolygon","coordinates":[[[[-102.043999,37.64146],[-102.041557,37.386261],[-102.036758,36.988972],[-102.997223,36.998505],[-103.077377,36.999741],[-103.993111,36.994446],[-105.145615,36.993183],[-105.212532,36.99258],[-105.712891,36.994541],[-105.991425,36.992275],[-106.471588,36.991493],[-106.860657,36.989491],[-106.889778,36.999073],[-107.410217,36.99752],[-107.471855,36.998772],[-108.371834,36.999474],[-109.047821,36.996643],[-109.044937,37.630829],[-109.042542,37.887428],[-109.042801,38.152943],[-109.055199,38.24493],[-109.053284,38.494663],[-109.050751,39.360989],[-109.052864,39.518196],[-109.051888,39.65741],[-109.050591,40.210545],[-109.045479,40.665329],[-109.047638,40.998474],[-107.918037,41.00341],[-107.303436,41.000168],[-106.864838,40.998489],[-106.328545,41.001316],[-106.202896,41.000111],[-105.278259,40.996365],[-104.933968,40.994305],[-104.051201,41.003227],[-103.571823,40.999664],[-103.382469,41.000332],[-102.651802,40.998135],[-102.620789,41.000225],[-102.047279,40.998077],[-102.046532,40.743134],[-102.04557,40.697323],[-102.047157,40.431084],[-102.047081,40.342651],[-102.051071,39.998928],[-102.048981,39.568699],[-102.04834,39.562809],[-102.047417,39.126751],[-102.048515,39.036999],[-102.047112,38.692539],[-102.047127,38.615486],[-102.04509,38.263329],[-102.045601,38.253807],[-102.043518,37.734386],[-102.043999,37.64146]]]]},"geometry_name":"the_geom","properties":{"STATE_NAME":"Colorado","STATE_FIPS":"08","SUB_REGION":"Mtn","STATE_ABBR":"CO","LAND_KM":268659.501,"WATER_KM":960.364,"PERSONS":3294394,"FAMILIES":854214,"HOUSHOLD":1282489,"MALE":1631295,"FEMALE":1663099,"WORKERS":1233023,"DRVALONE":1216639,"CARPOOL":210274,"PUBTRANS":46983,"EMPLOYED":1633281,"UNEMPLOY":99438,"SERVICE":421079,"MANUAL":181760,"P_MALE":0.495,"P_FEMALE":0.505,"SAMP_POP":512677}},{"type":"Feature","id":"states.8","geometry":{"type":"MultiPolygon","coordinates":[[[[-95.071693,37.001408],[-95.406372,37.000538],[-95.525764,37.000938],[-95.785492,36.998035],[-95.957703,37.000011],[-96.005791,36.998264],[-96.518898,37.000538],[-96.74839,37.000134],[-97.137375,36.999779],[-97.46508,36.996441],[-97.803917,36.998543],[-98.104187,36.998646],[-98.346794,36.999035],[-98.539864,36.998348],[-98.999138,36.998043],[-99.43708,36.99453],[-99.544243,36.995434],[-99.998848,36.995388],[-100.088158,36.997623],[-100.633812,36.997807],[-100.950142,36.996635],[-101.071159,36.99744],[-101.553238,36.996666],[-102.024071,36.988853],[-102.036758,36.988972],[-102.041557,37.386261],[-102.043999,37.64146],[-102.043518,37.734386],[-102.045601,38.253807],[-102.04509,38.263329],[-102.047127,38.615486],[-102.047112,38.692539],[-102.048515,39.036999],[-102.047417,39.126751],[-102.04834,39.562809],[-102.048981,39.568699],[-102.051071,39.998928],[-101.406952,40.001007],[-101.321709,40.001823],[-100.754425,40.000195],[-100.734619,39.999168],[-100.190697,40.00058],[-100.180496,40.000473],[-99.627472,40.002979],[-99.177834,39.999565],[-99.064384,39.998325],[-98.720284,39.998447],[-98.504143,39.997116],[-98.26384,39.998421],[-97.929268,39.99844],[-97.816269,39.999718],[-97.361595,39.997375],[-96.907982,39.996151],[-96.801117,39.994473],[-96.453743,39.994171],[-96.240311,39.994503],[-96.000977,39.995159],[-95.780434,39.993488],[-95.329445,39.992596],[-95.308441,39.999409],[-95.240707,39.942108],[-95.207344,39.938179],[-95.19371,39.910183],[-95.150299,39.908058],[-95.100471,39.869869],[-95.062996,39.866543],[-95.033257,39.87785],[-95.021523,39.896984],[-94.964775,39.900829],[-94.937996,39.896088],[-94.936264,39.849392],[-94.92363,39.833138],[-94.898079,39.828339],[-94.88826,39.817406],[-94.899078,39.793781],[-94.933022,39.78278],[-94.934868,39.775433],[-94.921555,39.757847],[-94.876823,39.760685],[-94.870941,39.754124],[-94.877617,39.739311],[-94.905434,39.726761],[-94.930611,39.727032],[-94.952896,39.736507],[-94.96154,39.732044],[-94.978325,39.684994],[-95.028046,39.661919],[-95.055771,39.625694],[-95.053368,39.586781],[-95.108742,39.560696],[-95.101791,39.532852],[-95.047356,39.485332],[-95.040268,39.462944],[-94.985962,39.439465],[-94.958252,39.411449],[-94.925507,39.381268],[-94.898041,39.380642],[-94.911102,39.340122],[-94.90744,39.323029],[-94.880867,39.286045],[-94.833237,39.261765],[-94.82058,39.211002],[-94.78981,39.19688],[-94.730293,39.171253],[-94.675278,39.174919],[-94.646172,39.158424],[-94.612419,39.151646],[-94.60099,39.141224],[-94.607903,39.112797],[-94.609047,39.044662],[-94.612236,38.837101],[-94.612915,38.737213],[-94.618484,38.471458],[-94.61882,38.392014],[-94.617096,38.055752],[-94.616501,38.030354],[-94.619057,37.679825],[-94.618759,37.65033],[-94.61853,37.360714],[-94.618744,37.327679],[-94.620438,37.060085],[-94.620155,36.996983],[-95.032509,37.00071],[-95.071693,37.001408]]]]},"geometry_name":"the_geom","properties":{"STATE_NAME":"Kansas","STATE_FIPS":"20","SUB_REGION":"W N Cen","STATE_ABBR":"KS","LAND_KM":211921.641,"WATER_KM":1188.865,"PERSONS":2477574,"FAMILIES":658600,"HOUSHOLD":944726,"MALE":1214645,"FEMALE":1262929,"WORKERS":907383,"DRVALONE":928575,"CARPOOL":135598,"PUBTRANS":7585,"EMPLOYED":1172214,"UNEMPLOY":57772,"SERVICE":346339,"MANUAL":166429,"P_MALE":0.49,"P_FEMALE":0.51,"SAMP_POP":453411}},{"type":"Feature","id":"states.12","geometry":{"type":"MultiPolygon","coordinates":[[[[-94.439102,34.92905],[-94.44574,34.735504],[-94.452408,34.508327],[-94.461479,34.196655],[-94.468376,33.939198],[-94.476486,33.631966],[-94.50061,33.623047],[-94.510559,33.63081],[-94.525055,33.621021],[-94.51799,33.643009],[-94.550194,33.632694],[-94.562149,33.635536],[-94.562195,33.64283],[-94.541931,33.648247],[-94.545418,33.661621],[-94.576462,33.652157],[-94.588387,33.655449],[-94.585159,33.662132],[-94.565208,33.663013],[-94.560722,33.671913],[-94.578506,33.670471],[-94.585106,33.678982],[-94.600945,33.665607],[-94.631737,33.683899],[-94.638763,33.670105],[-94.658539,33.663738],[-94.669426,33.666061],[-94.667953,33.671459],[-94.644325,33.67765],[-94.655479,33.692291],[-94.668457,33.696537],[-94.690987,33.690289],[-94.741653,33.701267],[-94.754478,33.707771],[-94.742111,33.719048],[-94.762718,33.716797],[-94.749771,33.736706],[-94.783157,33.733665],[-94.782028,33.742268],[-94.764175,33.752842],[-94.783508,33.753262],[-94.803223,33.739582],[-94.81916,33.749405],[-94.85788,33.749321],[-94.881638,33.774963],[-94.913879,33.789597],[-94.908546,33.803478],[-94.918236,33.816196],[-94.940399,33.815807],[-94.939888,33.840824],[-94.959908,33.848076],[-94.968704,33.866215],[-94.989281,33.856182],[-95.012772,33.869946],[-95.037361,33.866451],[-95.042862,33.884445],[-95.063141,33.896694],[-95.063477,33.917648],[-95.083603,33.888462],[-95.089714,33.896915],[-95.082268,33.918453],[-95.09536,33.921738],[-95.119225,33.912281],[-95.126678,33.917145],[-95.127968,33.940868],[-95.148315,33.943546],[-95.234039,33.964863],[-95.251289,33.936443],[-95.250992,33.905022],[-95.263618,33.8978],[-95.277351,33.917938],[-95.28643,33.886902],[-95.301956,33.886623],[-95.336227,33.897114],[-95.33004,33.870918],[-95.451607,33.865753],[-95.468124,33.886433],[-95.498856,33.881718],[-95.512886,33.897736],[-95.544037,33.885742],[-95.547493,33.893158],[-95.526733,33.897816],[-95.519577,33.906643],[-95.546318,33.904034],[-95.562775,33.936073],[-95.606071,33.944553],[-95.61483,33.936691],[-95.612984,33.920238],[-95.633492,33.920105],[-95.699707,33.894825],[-95.746864,33.903397],[-95.760696,33.89344],[-95.764252,33.879005],[-95.768517,33.851402],[-95.795479,33.864674],[-95.825974,33.843025],[-95.846558,33.841038],[-95.933075,33.89053],[-95.943069,33.889973],[-95.958763,33.86504],[-95.977394,33.857952],[-95.994209,33.875378],[-96.002617,33.87339],[-96.001793,33.856979],[-96.014069,33.844208],[-96.026749,33.856022],[-96.047974,33.841278],[-96.091522,33.844578],[-96.109444,33.829258],[-96.148964,33.83559],[-96.169205,33.828983],[-96.183128,33.815792],[-96.180725,33.808434],[-96.154518,33.823944],[-96.141418,33.82032],[-96.161316,33.798229],[-96.168816,33.769356],[-96.187027,33.758583],[-96.212547,33.756691],[-96.278076,33.773388],[-96.28968,33.761932],[-96.300789,33.71405],[-96.316277,33.701801],[-96.347588,33.705528],[-96.370819,33.740395],[-96.419464,33.788326],[-96.487373,33.77813],[-96.500748,33.78809],[-96.510574,33.815685],[-96.562134,33.82542],[-96.601196,33.842957],[-96.614166,33.8629],[-96.584488,33.896145],[-96.666237,33.913544],[-96.677704,33.904324],[-96.693382,33.847904],[-96.711678,33.83387],[-96.748825,33.831738],[-96.797592,33.869949],[-96.814117,33.871769],[-96.844009,33.858032],[-96.861015,33.861679],[-96.878937,33.884003],[-96.882851,33.924591],[-96.898453,33.950027],[-96.929565,33.961773],[-96.936203,33.947849],[-96.968185,33.937321],[-96.987862,33.944202],[-96.987709,33.876423],[-97.005852,33.850513],[-97.025597,33.840561],[-97.0709,33.856728],[-97.082176,33.851101],[-97.078247,33.837811],[-97.050026,33.823448],[-97.087669,33.807571],[-97.083466,33.742413],[-97.0905,33.73167],[-97.115562,33.725933],[-97.152473,33.728668],[-97.189163,33.752769],[-97.208321,33.819649],[-97.195015,33.836159],[-97.168594,33.847794],[-97.164169,33.863148],[-97.187767,33.899204],[-97.211334,33.905689],[-97.246063,33.894238],[-97.250687,33.872971],[-97.263908,33.85873],[-97.272278,33.872574],[-97.314087,33.89584],[-97.314957,33.870392],[-97.341805,33.861916],[-97.363319,33.831024],[-97.410118,33.820709],[-97.452736,33.836212],[-97.457062,33.89043],[-97.462761,33.902382],[-97.477531,33.907707],[-97.518204,33.916771],[-97.554588,33.903904],[-97.575668,33.902531],[-97.592354,33.917885],[-97.600182,33.969437],[-97.671066,33.988613],[-97.704262,33.971546],[-97.729019,33.939293],[-97.756363,33.932098],[-97.790207,33.890457],[-97.852547,33.857071],[-97.869751,33.855114],[-97.909065,33.874023],[-97.954735,33.88348],[-97.976379,33.902504],[-97.976128,33.912052],[-97.950684,33.932518],[-97.962997,33.94865],[-97.947754,33.959751],[-97.950226,33.971161],[-97.982681,34.001286],[-98.023491,33.986984],[-98.055557,33.989799],[-98.086205,34.005314],[-98.110687,34.06982],[-98.094124,34.134556],[-98.114868,34.148987],[-98.136864,34.138432],[-98.172844,34.115368],[-98.277,34.122871],[-98.320488,34.13942],[-98.350403,34.14212],[-98.384254,34.11578],[-98.390953,34.087231],[-98.407135,34.082455],[-98.421341,34.06583],[-98.448189,34.054375],[-98.499519,34.066414],[-98.557579,34.105335],[-98.576332,34.14193],[-98.607246,34.151398],[-98.625992,34.158436],[-98.66172,34.147038],[-98.682213,34.149998],[-98.705292,34.130714],[-98.778534,34.131962],[-98.811066,34.145935],[-98.891342,34.16082],[-98.952507,34.194565],[-98.996193,34.209496],[-99.035217,34.198921],[-99.07843,34.208359],[-99.127945,34.201469],[-99.176155,34.21273],[-99.190483,34.223736],[-99.204597,34.255646],[-99.196304,34.305122],[-99.20549,34.331993],[-99.254105,34.368214],[-99.267174,34.398285],[-99.323296,34.412708],[-99.364204,34.450195],[-99.392792,34.428993],[-99.394157,34.396744],[-99.409958,34.369106],[-99.438377,34.364704],[-99.479439,34.383522],[-99.502136,34.404068],[-99.553864,34.41518],[-99.57785,34.408913],[-99.58522,34.384857],[-99.601448,34.368557],[-99.684906,34.377445],[-99.777687,34.443993],[-99.829933,34.501778],[-99.860573,34.518627],[-99.8806,34.548176],[-99.931908,34.579109],[-99.94474,34.579571],[-99.972099,34.561863],[-99.996094,34.562321],[-99.998878,34.747185],[-99.996071,35.030998],[-99.997185,35.182182],[-99.994354,35.424572],[-100,35.618809],[-99.997726,35.883793],[-99.997154,36.057549],[-100.001144,36.492519],[-100.006866,36.493877],[-100.549416,36.489449],[-100.956909,36.489609],[-101.089668,36.488022],[-101.620316,36.492004],[-102.03421,36.492954],[-102.165222,36.490208],[-102.996918,36.492344],[-102.997223,36.998505],[-102.036758,36.988972],[-102.024071,36.988853],[-101.553238,36.996666],[-101.071159,36.99744],[-100.950142,36.996635],[-100.633812,36.997807],[-100.088158,36.997623],[-99.998848,36.995388],[-99.544243,36.995434],[-99.43708,36.99453],[-98.999138,36.998043],[-98.539864,36.998348],[-98.346794,36.999035],[-98.104187,36.998646],[-97.803917,36.998543],[-97.46508,36.996441],[-97.137375,36.999779],[-96.74839,37.000134],[-96.518898,37.000538],[-96.005791,36.998264],[-95.957703,37.000011],[-95.785492,36.998035],[-95.525764,37.000938],[-95.406372,37.000538],[-95.071693,37.001408],[-95.032509,37.00071],[-94.620155,36.996983],[-94.62146,36.763538],[-94.62085,36.670471],[-94.617035,36.489338],[-94.607231,36.478714],[-94.552895,36.164444],[-94.542198,36.106754],[-94.485718,35.760227],[-94.468269,35.641003],[-94.428337,35.400455],[-94.439102,34.92905]]]]},"geometry_name":"the_geom","properties":{"STATE_NAME":"Oklahoma","STATE_FIPS":"40","SUB_REGION":"W S Cen","STATE_ABBR":"OK","LAND_KM":177877.536,"WATER_KM":3170.998,"PERSONS":3145585,"FAMILIES":855321,"HOUSHOLD":1206135,"MALE":1530819,"FEMALE":1614766,"WORKERS":1146497,"DRVALONE":1078894,"CARPOOL":190902,"PUBTRANS":7817,"EMPLOYED":1369138,"UNEMPLOY":100931,"SERVICE":405802,"MANUAL":205601,"P_MALE":0.487,"P_FEMALE":0.513,"SAMP_POP":528722}},{"type":"Feature","id":"states.16","geometry":{"type":"MultiPolygon","coordinates":[[[[-109.048882,32.441967],[-109.050728,32.77948],[-109.049904,33.205101],[-109.049721,33.783249],[-109.048012,34.59174],[-109.045998,34.954613],[-109.047195,35.996655],[-109.047821,36.996643],[-108.371834,36.999474],[-107.471855,36.998772],[-107.410217,36.99752],[-106.889778,36.999073],[-106.860657,36.989491],[-106.471588,36.991493],[-105.991425,36.992275],[-105.712891,36.994541],[-105.212532,36.99258],[-105.145615,36.993183],[-103.993111,36.994446],[-103.077377,36.999741],[-102.997223,36.998505],[-102.996918,36.492344],[-103.026802,36.491566],[-103.02356,36.056026],[-103.022118,35.742287],[-103.021797,35.623604],[-103.02565,35.177208],[-103.02475,34.964718],[-103.022156,34.745266],[-103.029144,34.307743],[-103.032761,33.826088],[-103.038239,33.565742],[-103.042603,33.377728],[-103.048836,32.953533],[-103.059547,32.51543],[-103.055191,32.084995],[-103.057968,32.0019],[-103.332092,32.004154],[-103.728973,32.006104],[-103.980896,32.00589],[-104.018814,32.007278],[-104.850563,32.003151],[-104.921799,32.004269],[-106.002708,32.001553],[-106.377846,32.000645],[-106.623077,32.000988],[-106.649513,31.980228],[-106.632057,31.972118],[-106.633202,31.913998],[-106.643532,31.895102],[-106.615578,31.844635],[-106.614441,31.817728],[-106.538971,31.786198],[-107.282997,31.784981],[-108.20266,31.786804],[-108.21006,31.343742],[-109.045006,31.343348],[-109.048882,32.441967]]]]},"geometry_name":"the_geom","properties":{"STATE_NAME":"New Mexico","STATE_FIPS":"35","SUB_REGION":"Mtn","STATE_ABBR":"NM","LAND_KM":304472.805,"WATER_KM":586.054,"PERSONS":1379559,"FAMILIES":358259,"HOUSHOLD":497680,"MALE":677870,"FEMALE":701689,"WORKERS":491847,"DRVALONE":433150,"CARPOOL":87085,"PUBTRANS":6019,"EMPLOYED":576213,"UNEMPLOY":49368,"SERVICE":169914,"MANUAL":68673,"P_MALE":0.491,"P_FEMALE":0.509,"SAMP_POP":237629}},{"type":"Feature","id":"states.38","geometry":{"type":"MultiPolygon","coordinates":[[[[-101.406952,40.001007],[-102.051071,39.998928],[-102.047081,40.342651],[-102.047157,40.431084],[-102.04557,40.697323],[-102.046532,40.743134],[-102.047279,40.998077],[-102.620789,41.000225],[-102.651802,40.998135],[-103.382469,41.000332],[-103.571823,40.999664],[-104.051201,41.003227],[-104.053505,41.388107],[-104.054993,41.564247],[-104.053108,41.698246],[-104.053009,41.999851],[-104.055725,42.614704],[-104.05571,43.003094],[-103.500984,42.99865],[-103.005409,42.999374],[-102.787933,42.995323],[-102.086273,42.989891],[-101.231308,42.986835],[-100.197739,42.991089],[-99.532402,42.992332],[-99.253593,42.99239],[-98.497292,42.991783],[-98.457085,42.937164],[-98.390846,42.920139],[-98.309982,42.881798],[-98.167473,42.839573],[-98.144516,42.835796],[-98.122765,42.820225],[-98.121468,42.808361],[-98.032791,42.769192],[-97.994797,42.766811],[-97.963211,42.773689],[-97.929131,42.792324],[-97.889595,42.831272],[-97.888313,42.855808],[-97.818298,42.866589],[-97.796684,42.849598],[-97.771843,42.846165],[-97.724907,42.858009],[-97.68541,42.836838],[-97.634628,42.861286],[-97.570312,42.847992],[-97.505791,42.860138],[-97.482819,42.857159],[-97.456924,42.850445],[-97.388969,42.867435],[-97.311081,42.861774],[-97.271126,42.850018],[-97.242859,42.85183],[-97.224113,42.841206],[-97.211502,42.812576],[-97.161095,42.798622],[-97.130142,42.773926],[-97.014816,42.759544],[-96.979271,42.758316],[-96.969681,42.752068],[-96.977547,42.72731],[-96.970451,42.721149],[-96.907913,42.731701],[-96.809822,42.704086],[-96.81012,42.681343],[-96.799026,42.670021],[-96.722343,42.668594],[-96.698746,42.657719],[-96.694283,42.641167],[-96.714958,42.62191],[-96.713745,42.612305],[-96.63636,42.550735],[-96.628983,42.522697],[-96.605156,42.50724],[-96.584442,42.518291],[-96.546906,42.520504],[-96.494392,42.488464],[-96.439087,42.489246],[-96.395767,42.467407],[-96.397583,42.441799],[-96.41732,42.414783],[-96.411453,42.380924],[-96.423866,42.349285],[-96.389473,42.328796],[-96.368393,42.298031],[-96.342575,42.282089],[-96.332352,42.260315],[-96.337402,42.22953],[-96.363205,42.21405],[-96.35186,42.168194],[-96.284821,42.123463],[-96.265182,42.048908],[-96.238426,42.02845],[-96.235794,42.00127],[-96.202545,41.996628],[-96.184921,41.980698],[-96.147034,41.966267],[-96.145576,41.924919],[-96.159676,41.904163],[-96.13533,41.862633],[-96.076126,41.791481],[-96.09903,41.752987],[-96.09948,41.731575],[-96.085266,41.704998],[-96.12191,41.694923],[-96.119972,41.684105],[-96.099014,41.65469],[-96.111015,41.599014],[-96.080544,41.576008],[-96.091644,41.563152],[-96.085548,41.537529],[-96.049881,41.524342],[-96.004303,41.536671],[-95.993675,41.528111],[-95.996399,41.511524],[-96.013161,41.493],[-96.006607,41.48196],[-95.952896,41.472393],[-95.934776,41.462387],[-95.939766,41.39481],[-95.942604,41.34008],[-95.888817,41.301392],[-95.897301,41.286865],[-95.910912,41.308472],[-95.929939,41.302059],[-95.91069,41.225246],[-95.921959,41.207855],[-95.91581,41.194065],[-95.85891,41.180538],[-95.859512,41.166866],[-95.876396,41.164204],[-95.857986,41.109188],[-95.878517,41.065872],[-95.859253,41.035004],[-95.860611,41.002651],[-95.837318,40.974258],[-95.836258,40.901108],[-95.834114,40.8703],[-95.846153,40.848331],[-95.851509,40.792599],[-95.876335,40.730434],[-95.767723,40.643116],[-95.757271,40.620903],[-95.767204,40.589046],[-95.763138,40.549706],[-95.736763,40.532372],[-95.691795,40.524128],[-95.687141,40.561169],[-95.675423,40.565834],[-95.662674,40.558727],[-95.657791,40.530331],[-95.6847,40.512203],[-95.695091,40.485336],[-95.636551,40.396389],[-95.633919,40.358799],[-95.615936,40.346497],[-95.617668,40.331417],[-95.645287,40.322346],[-95.646561,40.309109],[-95.595268,40.309776],[-95.546875,40.266216],[-95.476562,40.226856],[-95.466377,40.213257],[-95.460693,40.173996],[-95.422218,40.131744],[-95.392555,40.115417],[-95.384285,40.095364],[-95.403526,40.080379],[-95.413506,40.048111],[-95.390274,40.043751],[-95.370987,40.028751],[-95.34481,40.024975],[-95.308441,39.999409],[-95.329445,39.992596],[-95.780434,39.993488],[-96.000977,39.995159],[-96.240311,39.994503],[-96.453743,39.994171],[-96.801117,39.994473],[-96.907982,39.996151],[-97.361595,39.997375],[-97.816269,39.999718],[-97.929268,39.99844],[-98.26384,39.998421],[-98.504143,39.997116],[-98.720284,39.998447],[-99.064384,39.998325],[-99.177834,39.999565],[-99.627472,40.002979],[-100.180496,40.000473],[-100.190697,40.00058],[-100.734619,39.999168],[-100.754425,40.000195],[-101.321709,40.001823],[-101.406952,40.001007]]]]},"geometry_name":"the_geom","properties":{"STATE_NAME":"Nebraska","STATE_FIPS":"31","SUB_REGION":"W N Cen","STATE_ABBR":"NE","LAND_KM":199113.203,"WATER_KM":1244.957,"PERSONS":1578385,"FAMILIES":415427,"HOUSHOLD":602363,"MALE":769439,"FEMALE":808946,"WORKERS":571600,"DRVALONE":590216,"CARPOOL":86820,"PUBTRANS":8988,"EMPLOYED":772813,"UNEMPLOY":29326,"SERVICE":249094,"MANUAL":108841,"P_MALE":0.487,"P_FEMALE":0.513,"SAMPPOP":328831}}],"crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::4326"}}}
shouldnt the app ask in the supported CRS and then reproject?
I dont remember what is the reason for having that option of using the view CRS for WFS layers...
I dont remember what is the reason for having that option of using the view CRS for WFS layers...
this option confused me, but maybe because I'm not understanding 100% how WFS works. What I know is that WFS layers are always served in just one CRS, so there is never server side reprojection (unlike WMS). So if needed reprojection must be done always client side.
There is server-side reprojection available for WFS normally though
WFS layers have a native CRS, but they can definitely be reprojected by GeoServer
I'm going to do some tests with my local GeoServer setup and will report back here
I'm getting this:
<ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ows="http://www.opengis.net/ows" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/ows http://localhost:4000/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd">
<ows:Exception exceptionCode="NoApplicableCode">
<ows:ExceptionText>org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 281; The value of the attribute "prefix="xmlns",localpart="feature",rawname="xmlns:feature"" is invalid. Prefixed namespace bindings may not be empty.
The value of the attribute "prefix="xmlns",localpart="feature",rawname="xmlns:feature"" is invalid. Prefixed namespace bindings may not be empty.</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>
probably related to the empty featureNS that WAB provides
cc @volaya
So @gioman for me the layer shows up fine, I just can't do any transactions. Will see if WebSDK can get the correct featureNS through DescribeFeatureType
WFS layers have a native CRS, but they can definitely be reprojected by GeoServer
I'm not sure (and here I trust you guys) that this is a standard thing, maybe GS can do, but I believe others don't.
see: http://docs.geoserver.org/latest/en/user/services/wfs/vendor.html#reprojection What you say was true for WFS 1.0.0
see: http://docs.geoserver.org/latest/en/user/services/wfs/vendor.html#reprojection What you say was true for WFS 1.0.0
good to know! anyway I think this allows us close in to the issue... afaik QGIS WFS client always defaults to 1.0.0
I've verified it works with my local GeoServer after CORS is enabled, after my recent SDK changes and @volaya's recent WAB changes
@volaya do you still plan to add the CORS warning for WFS, or was it done already?
No, i have to add it
On Thu, Mar 16, 2017 at 2:48 PM, Bart van den Eijnden < notifications@github.com> wrote:
I've verified it works with my local GeoServer after CORS is enabled, after my recent SDK changes and @volaya https://github.com/volaya's recent WAB changes
@volaya https://github.com/volaya do you still plan to add the CORS warning for WFS, or was it done already?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/boundlessgeo/qgis-webappbuilder-plugin/issues/224#issuecomment-287061915, or mute the thread https://github.com/notifications/unsubscribe-auth/ACARkxy2AGmqIwRpjmLddcSX56j3RMCKks5rmT3IgaJpZM4Mcb5N .
-- Victor Olaya Software Engineer | Boundless http://boundlessgeo.com/ volaya@boundlessgeo.com @boundlessgeo http://twitter.com/boundlessgeo/
I added a check for CORS enabled for WFS layers. Please test and close the ticket if it's all fine
@volaya @bartvde I have setup a GeoServer instance with CORS enabled and JSONP not enabled. In WAB I add a WFS layer from such instance, I can add it if I leave the "use JSONP..." option enbled, but if I uncheck it I get a message like "Server for layer sf:streams is not allowed to accept cross-origin requests.". This seems the opposite of what I would expect.
my observations after the latest commits: 1) In the Geoserver endpoint I have enabled CORS but not JSONP. After the latest fixes a WFS layer from this endpoint can be added to the webapp regardless the option "use JSONP..." is enabled or not. In both cases WFS-T works. 2) I tried add a WFS layer from a QGIS Server endpoint CORS seems correctly enabled. The layer can be added on if the "use JSONP..." is disabled. In the resulting webapp the layer is visible in the layer list but not on the map. 3) I could try also a Mapserver endpoint as cgi application using Apache, but I'm pretty sure results will be the same as 2)
@SrNetoChan just a reminder, we must document that in this release the only supported endpoint is Geoserver.
After disabling the "use JSONP for WFS connections" optoin I was able to generate webapps with WFS layers.
I used layers from Geoserver, Mapserver and QGIS server.
In all cases the layers are visible in the layer list, but only the ones from Geoserver are also visible on the map.
Mapserver demo server: http://demo.mapserver.org/cgi-bin/wfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetCapabilities
I can setup a QGIS Server demo endpoint if necessary.