[mapguide-users] Add a layer from a shape file (.shp) - MapGuide

Dave Wilson dave.wilson at autodesk.com
Tue May 26 17:51:38 EDT 2009


Is it expected to be a permanent layer or a temporary layer?

Basically you can modify a template (blank) XML FeatureSource connection file and do a SetResource on the results. After that you could also modify a template XML file for a layer definition and add that to the Library as well. This will take some DOM parsing to get the XML files correct with the unique properties of the SHP file.

>From there you can add the layer to your map definition and you should be good.

Sounds simple, but depending on whether it's permanent or temporary will dictate which Repository you use and whether or not the Map change is permanent or run time.

Of course with Open Layers in fusion there may be other options.

MGOS code samples explain how to set the resource stuff and somebody may have examples of DOM parsing for creating new layers.

Regards,
Dave
-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Tom Lazo
Sent: Tuesday, May 26, 2009 3:31 PM
To: mapguide-users at lists.osgeo.org
Subject: [mapguide-users] Add a layer from a shape file (.shp) - MapGuide


Hi all,

Well i have this doubt. I'd like to know if there's a way to add a layer
from a shape, just like ArcGis does. I mean, i'd like to have a button wich
opens an explorer wich allows me to choose a shape file.

I use Mapguide, Php, JavaScript and Fusion. Plz if sb knows how to do this,
email me the solution to tom.lazo at hotmail.com.

Thanks.

Tom Lazo.
-- 
View this message in context: http://n2.nabble.com/Add-a-layer-from-a-shape-file-%28.shp%29---MapGuide-tp2977365p2977365.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users


More information about the mapguide-users mailing list