[fusion-dev] map query in Fusion 2

Benoit Begin bbegin at geomapgis.ca
Wed Jun 24 22:47:41 EDT 2009


The query method no longer works the way it used to. Before, it would call
Query.php in the backend and allow you to generate a new selection via an
alphanumeric filter and/or a spatial filter. The new query method now calls
the QueryMapFeatures directly from the mapguide fcgi agent. So basically,
the functionallity has it used to exists is no longer present, as far as I
can tell.

You can, easily enough, bring back the code from the old query method into
the new Fusion 2.0. I copied over the query method from the previous version
and named it queryEx and made it use the same callbacks as the query method.
It worked fine for me and gave me back the functionality I needed from the
API. It's kind of a crummy fix, as my own code needs to work on either
pre-2.0 Fusion and 2.0 fusion. Still, it works.


Simon Pelicon wrote:
> 
> Hi!
> Using map.query in Fusion 1.1 does not require geometry parameter as
> Fusion 2.0. (i use Mapguide Open Source 2.0.2)
> Using map.query with Fusion 2.0 without options.geometry returns error:
> 
> Invalid argument(s):
> 
> 	[1] = ""
> 
> The AGF text is invalid because it failed to parse into a valid geometry
> object.</h2>
> 
> Invalid argument(s):
> 
> 	[1] = ""
> 
> The AGF text is invalid because it failed to parse into a valid geometry
> object.
> 
> Exception occurred in method MgParseAwkt.ParseAwkt at line 89 in file
> d:\build\mapguide_open_source_v2.0\build_30.11\mgdev\common\geometry\Parse/ParseAwkt.cpp
> 
> If i add geometry to other parameters works ok.
> 
> options.geometry = 'POLYGON((6129642 4676854,6776931 4676854,6776931
> 5042345,6129642 5042345,6129642 4676854))';
> options.filter = 'KAPACITET <= 100';
> options.layers = 'Bakarnikabal';
> options.maxFeatures = 10;
> map.query(options); 
> 
> 
> How should i use query function in Fusion 2.0?
> 
> 
> 
> Thanks!
> 
> Simon
> 
> 
> 
> 
> 
> _______________________________________________
> fusion-dev mailing list
> fusion-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fusion-dev
> 
> 

-- 
View this message in context: http://n2.nabble.com/map-query-in-Fusion-2-tp2668477p3152844.html
Sent from the Fusion Developers mailing list archive at Nabble.com.



More information about the fusion-dev mailing list