After much testing, I created a shp with a ESRI's tool, and she has worked.
Before, I was creating the shp with gvSIG, and it seems that there is a
problem in some way not understood with MapGuide.<br><br>Thanks to all.<br><br><br><div class="gmail_quote"><br>2009/3/4 Micho Gar <span dir="ltr">&lt;<a href="mailto:michogar@gmail.com">michogar@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Thanks to all, <br><br>this the XML for this resource<br><br>&lt;FeatureSource xsi:noNamespaceSchemaLocation=&quot;FeatureSource-1.0.0.xsd&quot;&gt;<br>
&lt;Provider&gt;OSGeo.SHP&lt;/Provider&gt;<br>&minus;<br>&lt;Parameter&gt;<br>
&lt;Name&gt;DefaultFileLocation&lt;/Name&gt;<br>&lt;Value&gt;%MG_DATA_PATH_ALIAS[datos]%poligonos/zonas.shp&lt;/Value&gt;<br>&lt;/Parameter&gt;<br>&minus;<br>&lt;Parameter&gt;<br>&lt;Name&gt;TemporaryFileLocation&lt;/Name&gt;<br>

&lt;Value&gt;%MG_DATA_PATH_ALIAS[datos]%temp/&lt;/Value&gt;<br>&lt;/Parameter&gt;<br>&lt;/FeatureSource&gt;<br><br><div style="text-align: left;" dir="ltr">I am still looking for that these days I could not get it.<br>
<br><br><br><br></div><br><br><div class="gmail_quote">2009/3/3 Ivan Milicevic <span dir="ltr">&lt;<a href="mailto:Ivan.Milicevic@supranet.hr" target="_blank">Ivan.Milicevic@supranet.hr</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="h5">









<div link="blue" vlink="purple" lang="HR">

<div>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">MIcho,</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">&nbsp;</span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Please, open </span><a href="http://gis.supranet.hr/mapguide/mapagent/index.html" target="_blank">http://gis.supranet.hr/mapguide/mapagent/index.html</a>
click on Resource-&gt;GetResourceContent</p>

<p>&nbsp;</p>

<p>Maybe your feature source is set to rtead only. I had the
same problem in past couple of days.<span style="font-size: 11pt; color: rgb(31, 73, 125);"></span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">&nbsp;</span></p>

<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0cm 0cm;">

<p><b><span style="font-size: 10pt;" lang="EN-US">From:</span></b><span style="font-size: 10pt;" lang="EN-US"> <a href="mailto:mapguide-users-bounces@lists.osgeo.org" target="_blank">mapguide-users-bounces@lists.osgeo.org</a>
[mailto:<a href="mailto:mapguide-users-bounces@lists.osgeo.org" target="_blank">mapguide-users-bounces@lists.osgeo.org</a>] <b>On Behalf Of </b>Micho Gar<br>
<b>Sent:</b> Monday, March 02, 2009 6:44 PM<br>
<b>To:</b> MapGuide Users Mail List<br>
<b>Subject:</b> [mapguide-users] Polygon are not recorded in feature</span></p>

</div><div><div></div><div>

<p>&nbsp;</p>

<p>Hi all, <br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <br>
I have a code that should save the polygons in the feature source after using
the Digitize. In principle I do not give any error, but when reviewing the shp
the polygon don´t appear. I leave with you the code because I don´t see
anything bad.<br>
<br>
MgUserInformation userInfo = new MgUserInformation(sessionId);<br>
MgSiteConnection siteConnection = new MgSiteConnection();<br>
siteConnection.Open(userInfo);<br>
<br>
MgResourceService resourceService =
(MgResourceService)siteConnection.CreateService(MgServiceType.ResourceService);<br>
MgFeatureService featureService =
(MgFeatureService)siteConnection.CreateService(MgServiceType.FeatureService);<br>
<br>
MgResourceIdentifier zonasFeatureId = new MgResourceIdentifier(&quot;Library://ConectorGPS/Datos/poligonosZonas.FeatureSource&quot;);<br>
MgFeatureCommandCollection zonasComando = new MgFeatureCommandCollection();<br>
<br>
//Abrimos el mapa<br>
MgMap mapa = new MgMap();<br>
mapa.Open(resourceService, mapName);<br>
<br>
//creamos la geometria<br>
MgGeometryFactory geometryFactory = new MgGeometryFactory();<br>
MgCoordinateCollection coordinateCollection = new MgCoordinateCollection();<br>
//MgLinearRingCollection interiorRingCollection = new MgLinearRingCollection();<br>
MgAgfReaderWriter geometryReaderWriter = new MgAgfReaderWriter();<br>
<br>
int count = xCollection.length;<br>
for(int i=0; i&lt;count;i++)<br>
{<br>
&nbsp;&nbsp;&nbsp; Double x = Double.valueOf(xCollection[i]);<br>
&nbsp;&nbsp;&nbsp; Double y = Double.valueOf(yCollection[i]);<br>
&nbsp;&nbsp;&nbsp; MgCoordinate&nbsp; coordinate =
geometryFactory.CreateCoordinateXY(x,y);<br>
&nbsp;&nbsp;&nbsp; coordinateCollection.Add(coordinate);<br>
}<br>
MgLinearRing exteriorRing =
geometryFactory.CreateLinearRing(coordinateCollection);<br>
MgPolygon polygon = geometryFactory.CreatePolygon(exteriorRing,null);<br>
MgByteReader geom = geometryReaderWriter.Write(polygon);<br>
<br>
//creamos una coleccion de propiedades y la insertamos<br>
MgPropertyCollection propiedades = new MgPropertyCollection();<br>
propiedades.Add(new MgGeometryProperty(&quot;Geometry&quot;, geom));<br>
propiedades.Add(new MgStringProperty(&quot;ID&quot;, &quot;zona1&quot;));<br>
zonasComando.Add(new MgInsertFeatures(&quot;zonasCapa&quot;, propiedades));<br>
<br>
featureService.UpdateFeatures(zonasFeatureId, zonasComando, false);<br>
<br>
//capturamos la capa para salvar el mapa y refrescar<br>
MgLayerBase zonasCapa = mapa.GetLayers().GetItem(&quot;zonasCapa&quot;);<br>
zonasCapa.SetVisible(true);<br>
zonasCapa.ForceRefresh();<br>
mapa.Save(resourceService);&nbsp;&nbsp;&nbsp; <br>
out.println(&quot;finish&quot;);<br>
<br>
<br>
Thanks<br clear="all">
<br>
-- <br>
# michogar<br>
# Analista Programador SIG<br>
# Ubuntu Linux Counter 462666<br>
<br>
<br>
<br>
&quot;Cuenta una leyenda que si reproduces un DVD de Windows Vista original al
revés se oye a Bill Gates entonando cantos satánicos... Pero eso no es lo
peor... Si lo reproduces del derecho... ˇSe instala!.&quot;<br>
<br>
<br>
&quot;It has a legend that if you play an original Windows Vista DVD backwards
to hear Bill Gates Satanic chanting songs ... But that&#39;s not the worst ... If
you play it right ... It installs!. </p>

</div></div></div>

</div>


<br></div></div><div class="im">_______________________________________________<br>
mapguide-users mailing list<br>
<a href="mailto:mapguide-users@lists.osgeo.org" target="_blank">mapguide-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/mapguide-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a><br>
<br></div></blockquote></div><br><br clear="all"><div><div></div><div class="h5"><br>-- <br># michogar<br># Analista Programador SIG<br># Ubuntu Linux Counter 462666<br><br><br><br>&quot;Cuenta una leyenda que si reproduces un DVD de Windows Vista original al revés se oye a Bill Gates entonando cantos satánicos... Pero eso no es lo peor... Si lo reproduces del derecho... ˇSe instala!.&quot;<br>


<br>        <br>&quot;It has a legend that if you play an original Windows Vista DVD backwards to hear Bill Gates Satanic chanting songs ... But that&#39;s not the worst ... If you play it right ... It installs!. <br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br># michogar<br># Analista Programador SIG<br># Ubuntu Linux Counter 462666<br><br><br><br>&quot;Cuenta una leyenda que si reproduces un DVD de Windows Vista original al revés se oye a Bill Gates entonando cantos satánicos... Pero eso no es lo peor... Si lo reproduces del derecho... ˇSe instala!.&quot;<br>
<br>        <br>&quot;It has a legend that if you play an original Windows Vista DVD backwards to hear Bill Gates Satanic chanting songs ... But that&#39;s not the worst ... If you play it right ... It installs!. <br>