OL3 parser flips the coordinates

المشرف العام

Administrator
طاقم الإدارة
When requesting featureInfo from MapServer using getGetFeatureInfoUrl() of OL3 lib

var req_url = the_layer.getSource().getGetFeatureInfoUrl( evt.coordinate, map.getView().getResolution(), map.getView().getProjection(), //4326 { 'INFO_FORMAT': 'application/vnd.ogc.gml', });it returns response in which the coordinates X and Y are in coorect order but after parsing the response theu are flipped:

$.ajax(req_url, { async: false }) .done(function(resp){ //console.log(resp); WMSfeatures = parser.readFeatures(resp); console.log(WMSfeatures); });Coordinates in response from mapserver:

[[223.745,250.638],[232.028,255.22],[229.376,264.126]] (in EPSG:4326)

Parsed response:

[[250.638,223.745],[255.22,232.028],[264.126,229.376]] (in EPSG:4326)

What is wrong here?



أكثر...
 
أعلى