<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Could it be that "ID" is the primary key, and if you insert two
features with ID 11,<br>
it breaks? Or that the ID is auto-assigned, and thus not assignable
from MapGuide/FDO?<br>
<br>
btw, things tend to work better with MapGuide if your primary key is an
integer.<br>
<pre class="moz-signature" cols="72">Regards, Kenneth Skovhede, GEOGRAF A/S
</pre>
<br>
<br>
Stefan Dalakov skrev:
<blockquote cite="mid:4934EFE4.3090607@mapware.net" type="cite">
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
It is something stupid, but I cannot spot it...<br>
Everything works if I omit the bold part of the code :<br>
  <br>
&nbsp; function MakeLine($name, $x0, $y0 , $x1, $y1)<br>
&nbsp; {<br>
&nbsp;&nbsp;&nbsp; $propertyCollection = new MgPropertyCollection();<br>
  <b>&nbsp;&nbsp;&nbsp; $cntr = (double) 11.0 ;<br>
&nbsp;&nbsp;&nbsp; $idProperty = new MgDoubleProperty("ID",$cntr);<br>
&nbsp;&nbsp;&nbsp; $propertyCollection-&gt;Add($idProperty);<br>
  </b>&nbsp;&nbsp;&nbsp; $owner = "Aaa" ;<br>
&nbsp;&nbsp;&nbsp; $ownerProperty = new MgStringProperty("Owner", $owner);<br>
&nbsp;&nbsp;&nbsp; $propertyCollection-&gt;Add($ownerProperty);<br>
&nbsp;&nbsp;&nbsp; $nameProperty = new MgStringProperty("Purpose", $name);<br>
&nbsp;&nbsp;&nbsp; $propertyCollection-&gt;Add($nameProperty);<br>
&nbsp;&nbsp;&nbsp; $wktReaderWriter = new MgWktReaderWriter();<br>
&nbsp;&nbsp;&nbsp; $agfReaderWriter = new MgAgfReaderWriter();<br>
&nbsp;&nbsp;&nbsp; $agftext = "LINESTRING XY ($x0 $y0, $x1 $y1)" ;<br>
&nbsp;&nbsp;&nbsp; $geometry = $wktReaderWriter-&gt;Read( $agftext);<br>
&nbsp;&nbsp;&nbsp; $geometryByteReader = $agfReaderWriter-&gt;Write($geometry);<br>
&nbsp;&nbsp;&nbsp; $geometryProperty = new MgGeometryProperty("Geometry",
$geometryByteReader);<br>
&nbsp;&nbsp;&nbsp; $propertyCollection-&gt;Add($geometryProperty);<br>
&nbsp;&nbsp;&nbsp; return $propertyCollection;<br>
&nbsp; }<br>
  <br>
MG Studio says this property is Double<br>
  <br>
Stefan Dalakov<br>
  <br>
  <br>
Kenneth Skovhede, GEOGRAF A/S wrote:
  <blockquote cite="mid:49345234.5070009@geograf.dk" type="cite">You
could be affected by this bug: <br>
    <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://trac.osgeo.org/mapguide/ticket/649">http://trac.osgeo.org/mapguide/ticket/649</a>
    <br>
    <br>
Otherwise, try to post a section of the code, <br>
maybe someone will spot something obvious. <br>
    <br>
Regards, Kenneth Skovhede, GEOGRAF A/S <br>
    <br>
    <br>
    <br>
Stefan Dalakov skrev: <br>
    <blockquote type="cite">Hi all, <br>
I am trying to add a feature (permanently) to a data source. <br>
I am using MGOS 1.2 and tried Sheboygan samples, where this part is not
working, I have not explored the reason yet. <br>
My idea is to digitize a feature ( a line ) and add it permanently to
an existing layer on the map. <br>
I wrote some code, and everything seems OK, no errors,&nbsp; but at the end
I have no feature added. <br>
Can someone help with a piece of code ? <br>
      <br>
Thanks in advance <br>
Stefan Dalakov <br>
_______________________________________________ <br>
mapguide-users mailing list <br>
      <a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
      <br>
      <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
      <br>
    </blockquote>
_______________________________________________ <br>
mapguide-users mailing list <br>
    <a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
    <br>
    <a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
    <br>
    <br>
  </blockquote>
  <br>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
mapguide-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapguide-users">http://lists.osgeo.org/mailman/listinfo/mapguide-users</a>
  </pre>
</blockquote>
</body>
</html>