I was having issues selecting points coming from an ODBC FDO FeatureSource, connecting to an SQL Server 2005 database. The database contained data that used to render in Mapguide 6.5, so all of my point data was in LL84. My map, however, is in NA-LM-CONIC. Therefore, on any selections Query.php has to reproject the WKT of the selection filter from NA-LM-CONIC to LL84.
In Query.php, there are a few calls to: $featureService->GetSpatialContexts($featureResId, true); and this is what is causing me all kinds of grief. For some reason, the activeOnly parameter returns nothing for my SQL Server feature source. So without the spatial context, it doesn't reproject the selection polygon and therefore doesn't select the point layer. Simply switching activeOnly to false makes everything work just fine. However, this feels like more of a hack than a proper fix.
What is the point of the activeOnly parameter? Won't this code break in something like ArcSDE where every table has its own Spatial Context definition? So the way it works now the selection WKT will just be reprojected in whatever the first Spatial Context was, not necessarily the one for the current layer.
Just as a side note, the tooltips were working fine, the only difference is that the MapTip.js widget calls Mapguide directly.