[mapguide-users] Create Layer

Robert Bray robert.bray at autodesk.com
Tue Jun 13 02:31:29 EDT 2006



In the sample code "Data" is the name of the geometry column in the SDF file. Your SDF file may use a different name to refer to the geometry property. One way to determine the name is to create a layer based on that SDF in Studio and see what Studio puts in the "Geometry:" field.





From: Amit Stein [mailto:amitstein at gmail.com] 
Sent: Monday, June 12, 2006 10:31 PM
To: users at mapguide.osgeo.org
Subject: [mapguide-users] Create Layer


Hi everybody,
I used the functions from layerdefinitionfactory.php to create a layer and the functions from the Developer's Guide (page 59) to add a layer. I had trouble creating and adding a layer to a map. None of the stuff I've been trying worked. 

The Feauture Source I am using is a SDF file and the type of geometry is Data. I used the Data type because in Map Guide Studio worked. However, I am not sure if this is what I am supposed to use when programmatically creating layers. 

I suppose that what I am doing is correct, but I can´t see the results. When I run the script the layer does not show up in the map. Maybe the layer was created but it wasn't added. Does anybody know how I can fix this???

I attached here the code. If somebody needs the SDF, ask me (I don´t send it because it weights 3MB).
Thank you

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20060612/4d3b5fce/attachment.html

More information about the Mapguide-users mailing list