[mapguide-users] RE: Drawing Polygon

Farah farah at egovernments.org
Fri Dec 1 00:55:31 EST 2006


Hi Kencana,,

This function is to release or close the the feature reader returned by the
feature property, if the command is of type insert features. If we don't
close the feature readers properly, the application could hang. 

I havent worked in php...so pardon me if im wrong...but isnt it possible to
write functions there...? So u can just include the same code as a function
rt?

Something like:
<?php function ReleaseReader($MgPropertyCollection,$
MgFeatureCommandCollection)
{
}
?>


Regards
Farah

-----Original Message-----
From: kencana kesuma [mailto:bluesky_dyx at hotmail.com] 
Sent: Friday, December 01, 2006 8:09 AM
To: users at mapguide.osgeo.org
Subject: RE: [mapguide-users] RE: Drawing Polygon

Hi Farah,

Thanks a lot for the explanation.
how ever i got one doubt.
can I know this code is for?
void ReleaseReader(MgPropertyCollection res, MgFeatureCommandCollection 
commands) throws MgException
{
    if(res == null)
        return;

    for(int i = 0; i < res.GetCount(); i++)
    {
        MgFeatureCommand cmd = commands.GetItem(i);
        if(cmd instanceof MgInsertFeatures)
        {
            MgFeatureProperty resProp = (MgFeatureProperty)res.GetItem(i);
            if(resProp != null)
            {
                MgFeatureReader reader = 
(MgFeatureReader)resProp.GetValue();
                if(reader == null)
                    return;
                reader.Close();
            }
        }
    }
}

do you have any idea how it done in PHP?

Regards,
Kencana


>From: "Farah" <farah at egovernments.org>
>Reply-To: users at mapguide.osgeo.org
>To: <bluesky_dyx at hotmail.com>
>CC: <users at mapguide.osgeo.org>
>Subject: [mapguide-users] RE: Drawing Polygon
>Date: Thu, 30 Nov 2006 17:06:13 +0530
>
>Hi !!
>
>
>I just tried a sample to create a temporary layer consisting of polygons
>drawn with the method: DigitizePolygon.
>
>I am attaching the code.
>1) digPolygon.jsp: This jsp draws the polygon on the map and calls the
>savePolygonLayer.jsp. After u click on the button in this page, you can 
>draw
>a polygon on the map. To complete the polygon, do ctrl+click.
>
>2)savePolygonLayer.jsp: this jsp creates a temporary layer with the polygon
>and displays it on map
>
>3) findParcelFunctions.jsp : functions to create the temporary feature
>source and layer
>
>4)polygon.xml: describing the temporary layer properties
>
>
>Regards
>Farah
>
>-----Original Message-----
>From: bluesky_dyx at hotmail.com [mailto:bluesky_dyx at hotmail.com]
>Sent: Thursday, November 30, 2006 2:37 PM
>To: farah at egovernments.org
>Subject: Drawing Polygon
>
>Hi,
>
>I was wondering, do you know how to create a new layer consists of polygon
>by using digitizepolygon features?
>any idea of this?
>I hope you can help me out.
>Thank you very much
>
>Regards,
>Kencana


><< digPolygon.jsp >>


><< findparcelfunctions.jsp >>


><< polygon.xml >>


><< savePolygonLayer.jsp >>


>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe at mapguide.osgeo.org
>For additional commands, e-mail: users-help at mapguide.osgeo.org

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE! 
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe at mapguide.osgeo.org
For additional commands, e-mail: users-help at mapguide.osgeo.org





More information about the Mapguide_users mailing list