[mapguide-users] Adding a temporary Layer in MapGuide

Kenneth Skovhede, GEOGRAF A/S ks at geograf.dk
Fri Jan 9 03:03:10 EST 2009


You need several steps.

1. Create a temporary FeatureSource for an SDF
2. Insert data into the temporary FeatureSource
3. Create a temporary LayerDefinition that points to the temporary 
FeatureSource
4. Insert the temporary layer into the runtime map
5. Refresh the map

This is a generic recipe for building dynamic layers, redlining, 
buffering, etc.
There exist code that does this in the "buffer" function used in the 
basic AJAX viewer.
Look at the "buffer.[php,aspx,jsp]" file in:
C:\Program 
Files\MapGuideOpenSource2.0\WebServerExtensions\www\mapviewer[php,net,jsp]

If you have trouble with one of the steps, please ask again.

An easier way of dealing with it would be to create a layer that 
displays ALL points.
Then use the SQL WHERE statement as the layers "filter" property.
This approach obviously has some limitations.

Regards, Kenneth Skovhede, GEOGRAF A/S



Carmelo Saffioti skrev:
> Hi everybody!
> I hope you can help me about this problem I'm having since several days:
>  
> 1) having x,y coordinates of a point, resulting from a sql query, how 
> can I display it at runtime on the map?
>  
> 2) having x,y coordinates of a sequence of points, resulting from a 
> sql query, how can I display them at runtime on the map?
>  
>  
>  
> I really hope you can help me with that
> Thank you very much in advance
> Carmelo
> ------------------------------------------------------------------------
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>   
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20090109/c1c1630c/attachment.html


More information about the mapguide-users mailing list