I'm developing an application using OpenLayers-3.8.2 and geoserver-2.7.2. I define a wfs layer as follow:
var url = "http://localhost:8084/geoserver/wfs?&service=WFS&" + "version=1.1.0&request=GetFeature&typeName=Calk
oint&" + "outputFormate=application/json";var format = new ol.format.WFS();source = new ol.source.Vector({ url: 'proxy.cgi?url=' + encodeURIComponent(u), format: format});layer = new ol.layer.Vector({ title: 'Iran bound', source: source});map.addLayer(layer);The source code using version 1.1.0. In this version it works fine, but when I change version to 1.0.0 or 2.0.0 it does not worked. The server response for various versions are as follow:
Version: 1.0.0:
27.195,28.9653 53.4167,60.8482 28.4101,41.5723 28.4101,41.5723 28.4101,41.5723 0.0 0.0 1 9 45.08176 37.57299 ORUMIEH-iran ...Version 1.1.0:
28.96533966064453 27.195 60.8482 53.41667175292969 41.5723 28.4101 41.5723 28.4101 41.5723 28.4101 0.0 0.0 1 9 45.08176 37.57299 ORUMIEH-iran ... Version 2.0.0:
28.96533966064453 27.195 60.8482 53.41667175292969 41.572266 28.410145 41.572266 28.410145 41.572266 28.410145 0.0 0.0 1 9 45.08176 37.57299 ORUMIEH-iran ... Where is the problem?
Is it OpenLayers bug?
How do I fix it?
A another thing is that when I use wfs in version 1.1.0 and I modify some features, I save layer according to this tutorial, And in geoserver the points coordinates are displaced (mypoint.x in client side save as y in server side and vice versa). But when I create a new feature, It save correctly.It's astounding and I'm confused. What do I do?
أكثر...
var url = "http://localhost:8084/geoserver/wfs?&service=WFS&" + "version=1.1.0&request=GetFeature&typeName=Calk
Version: 1.0.0:
27.195,28.9653 53.4167,60.8482 28.4101,41.5723 28.4101,41.5723 28.4101,41.5723 0.0 0.0 1 9 45.08176 37.57299 ORUMIEH-iran ...Version 1.1.0:
28.96533966064453 27.195 60.8482 53.41667175292969 41.5723 28.4101 41.5723 28.4101 41.5723 28.4101 0.0 0.0 1 9 45.08176 37.57299 ORUMIEH-iran ... Version 2.0.0:
28.96533966064453 27.195 60.8482 53.41667175292969 41.572266 28.410145 41.572266 28.410145 41.572266 28.410145 0.0 0.0 1 9 45.08176 37.57299 ORUMIEH-iran ... Where is the problem?
Is it OpenLayers bug?
How do I fix it?
A another thing is that when I use wfs in version 1.1.0 and I modify some features, I save layer according to this tutorial, And in geoserver the points coordinates are displaced (mypoint.x in client side save as y in server side and vice versa). But when I create a new feature, It save correctly.It's astounding and I'm confused. What do I do?
أكثر...