[mapguide-users] Add properties to a point

Kenneth Skovhede, GEOGRAF A/S ks at geograf.dk
Sun May 18 08:21:34 EDT 2008


I'm not sure you can modify an existing schema through MapGuide (you can 
through FDO if the provider supports it).

I don't have a sample, as I have not tried to do this.
You might get a hint from the buffer code in the viewer:

            MgClassDefinition classDef = new MgClassDefinition();

            //Set ID property. Hold this segment ID
            prop = new MgDataPropertyDefinition("ID");
            prop.SetDataType(MgPropertyType.Int32);
            classDef.GetProperties().Add(prop);

            //finally, creation of the feature source
            MgCreateSdfParams sdfParams = new 
MgCreateSdfParams("LatLong", srsDefMap, schema);
            featureSrvc.CreateFeatureSource(dataSourceId, sdfParams);

You will need to get a hold of the classDef for the featuresource, and 
then use the Add code.
Finally you have to call UpdateFeatureSource (if it exists).

Regards, Kenneth Skovhede, GEOGRAF A/S



Dorin skrev:
> Thanks,
>
> I know that, but I want to know more specific way how I can do that.
> lets supposed to have a layer with: Id ( as in markup example), Name 
> and Date ( String). The question is where I have to modify the class 
> in order to have those three properties. Can you help me?
>
> Best regards,
> Dorin
>
> ----- Original Message ----
> From: Jackie C. Ng <jumpinjackie at gmail.com>
> To: mapguide-users at lists.osgeo.org
> Sent: Friday, May 16, 2008 6:09:38 PM
> Subject: Re: [mapguide-users] Add properties to a point
>
>
> You would have to alter the MgClassDefinition object for the Markup 
> class to
> accomodate the properties that you want to put in.
>
> When you create your MgInsertFeatures object that gets passed to
> MgFeatureService::UpdateFeatures(), you would include these extra new
> properties as part of the new point to be inserted.
>
> - Jackie
>
>
> Dorin333 wrote:
> >
> > Hi all,
> > I want to add some extra properties to  point, generate through the 
> Markup
> > option from phpviewersample into MGOS.
> > Can anyone tell me how?
> > Thanks a lot.
> > Dorin
> >
> >
> >
> >     
> > _______________________________________________
> > mapguide-users mailing list
> > mapguide-users at lists.osgeo.org <mailto:mapguide-users at lists.osgeo.org>
> > http://lists.osgeo.org/mailman/listinfo/mapguide-users
> >
> >
>
>
> -----
> http://themapguyde.blogspot.com
>
> http://www.linkedin.com/in/jackieng
> -- 
> View this message in context: 
> http://www.nabble.com/Add-properties-to-a-point-tp17272945p17277070.html
> Sent from the MapGuide Users mailing list archive at Nabble.com 
> <http://Nabble.com>.
>
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org <mailto:mapguide-users at lists.osgeo.org>
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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/20080518/e1084a5c/attachment.html


More information about the mapguide-users mailing list