[mapguide-users] Re: Insert a Point in MapGuide map
GordonL
gordon.luckett at arrowgeomatics.com
Fri Nov 26 10:54:30 EST 2010
Why not use GeoRest? You can point georest to the layer you want to edit.
Expose the XML -
restcfg.xml
<Resource uripart="pti_23032">
<Source type="MapGuide">
<FeatureSource>Library://Data/pti_23032.FeatureSource</FeatureSource>
<FeatureClass>SHP_Schema:pti_23032</FeatureClass>
<ServerIp>127.0.0.0</ServerIp>
<ServerPort>2812</ServerPort>
</Source>
<Representation renderer="XML" pattern=".xml">
<Method name="GET" />
<Method name="PUT" />
<Method name="POST" />
<Method name="DELETE" />
</Representation>
</Resource>
Then you can draw or edit the Points in the XML - you will have to create
this bit...
<?xml version="1.0" encoding="UTF-8" ?>
<FeatureSet>
<Features>
<Feature>
<Property>
<Name>Geometry</Name>
<Value> POINT (-87.750602148149582 43.772512943108723)</Value>
</Property>
</Feature>
</Features>
</FeatureSet>
Use a POST to the data to update the XML point.
xmlhttp.open("POST",'http://localhost/georest/rest/data/pti_23032/.xml',true);
xmlhttp.setRequestHeader("Content-Type","application/xml; charset=UTF-8");
xmlhttp.send(xml);
For more details check out:
http://code.google.com/p/georest/wiki/ApiMethods#POST_Method
regards
gordon
--
View this message in context: http://osgeo-org.1803224.n2.nabble.com/Insert-a-Point-in-MapGuide-map-tp5777309p5777737.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users
mailing list