[mapguide-users] Re: Redline Text

Kenneth Skovhede, GEOGRAF A/S ks at geograf.dk
Thu Mar 4 05:57:25 EST 2010


You should use a click tool.
If you use the Ajax viewer, the function is called DigitizePoint,
not sure what the equivalent is in Fusion, but you can load some
MapGuide compatibility script if you can't find the right one.

In the callback handler you will get the x/y value of the point that
the user has clicked (in mapping coordinate system (MCS) values).

You then need to send the value to the server, using AJAX or a form post 
or similar.

On the server, if you have a database, simply insert the record as you 
would normaly,
using an SQL INSERT statement.

If you are not using a database (or want to support multiple datasource 
types), you can
use the MapGuide MgUpdateFeatures functions:
http://www.osgeo.org/files/mapguide/docs/webapi/d5/d10/class_mg_feature_service_278b25e5af6145f091457701fec788dd.htm#278b25e5af6145f091457701fec788dd

And specifically:
http://www.osgeo.org/files/mapguide/docs/webapi/d4/d63/class_mg_insert_features.htm

Regards, Kenneth Skovhede, GEOGRAF A/S

On 04-03-2010 09:14, Twi wrote:
> I have a datasource with a layer that looks
> my annotations.
> The problem how to liaison between the click of
> the user and insert the annotation database?
> Thank you
>    


More information about the mapguide-users mailing list