Mapguide 3.0 OpenLayers 3.12 jQuery 2.2.0 Windows 7 64bit I have a strange issue that maybe someone can help with. When sending a QUERYMAPFEATURES request to the Mapguide server using the code below, getJSON always reports success. On the first request, however, the data is empty. All subsequent requests, even for the exact same selection are fine and the data is as expected. If the browser is refreshed and a new session created, the data from the first request is again empty. Any thoughts?
wktFormat = new ol.format.WKT(); function sendSelectionQuery(geom, layers) { var reqQueryFeatures = 3; //Attributes var wkt = wktFormat.writeGeometry(geom); $.getJSON(mapAgentUrl, { "OPERATION": "QUERYMAPFEATURES", "VERSION": "2.6.0", "PERSIST": "1", "MAPNAME": mapName, "SESSION": sessionId, "LAYERNAMES": layers, "GEOMETRY": wkt, "SELECTIONVARIANT": "INTERSECTS", "SELECTIONCOLOR": "0xFF000000", "SELECTIONFORMAT": "PNG8", "MAXFEATURES": "-1", "REQUESTDATA": reqQueryFeatures, "FORMAT": "application/json" }, function (data, textStatus, jqXHR) { processQueryResult(data); }) .fail(function (jqXHR, textStatus, errorThrown) { $("#error").html(jqXHR.responseText); }); } -- View this message in context: http://osgeo-org.1560.x6.nabble.com/Mapguide-3-and-jQuery-First-ajax-request-returns-empty-json-tp5246579.html Sent from the MapGuide Users mailing list archive at Nabble.com. _______________________________________________ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users