[mapguide-users] display SQL select result

Kenneth Skovhede, GEOGRAF A/S ks at geograf.dk
Tue Feb 3 05:42:52 EST 2009


The most generic solution would be to create a temporary SDF FeatureSource,
and then insert the features from the database, one by one.
Code for this can be found in the buffer.aspx/jsp/php file (except the 
read from db loop).

However, it may be easier and faster to create a regular layer, 
displaying the entire source
table (or view). Instead of executing the select to the database, simply 
set the "Filter" of the
layer to match the "WHERE" clause in the SQL.
Obviosly, this is not always possible.

Another option would be to create a temporary table, which is supported 
by most
database systems, and use that as a FeatureSource.

Some databases can return an SHP file with the data. Such a file could 
be used to
create an SHP FeatureSource, and display it right away.

Regards, Kenneth Skovhede, GEOGRAF A/S



Peter Filip skrev:
> Hello!
>
> My sql select is returning spatial data. I'm looking for a neat solution for
> display this data. I can't put this data to a DB table. So i need somehow
> copy this data somewhere in the mapguide reposiroty. :-)  There will be
> couple thousands of records.   
> Any suggestions ?
>
>   


More information about the mapguide-users mailing list