<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
It is something stupid, but I cannot spot it...<br>
Everything works if I omit the bold part of the code :<br>
<br>
function MakeLine($name, $x0, $y0 , $x1, $y1)<br>
{<br>
$propertyCollection = new MgPropertyCollection();<br>
<b> $cntr = (double) 11.0 ;<br>
$idProperty = new MgDoubleProperty("ID",$cntr);<br>
$propertyCollection->Add($idProperty);<br>
</b> $owner = "Aaa" ;<br>
$ownerProperty = new MgStringProperty("Owner", $owner);<br>
$propertyCollection->Add($ownerProperty);<br>
$nameProperty = new MgStringProperty("Purpose", $name);<br>
$propertyCollection->Add($nameProperty);<br>
$wktReaderWriter = new MgWktReaderWriter();<br>
$agfReaderWriter = new MgAgfReaderWriter();<br>
$agftext = "LINESTRING XY ($x0 $y0, $x1 $y1)" ;<br>
$geometry = $wktReaderWriter->Read( $agftext);<br>
$geometryByteReader = $agfReaderWriter->Write($geometry);<br>
$geometryProperty = new MgGeometryProperty("Geometry",
$geometryByteReader);<br>
$propertyCollection->Add($geometryProperty);<br>
return $propertyCollection;<br>
}<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 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, 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 class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<br>
<a 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 class="moz-txt-link-abbreviated" href="mailto:mapguide-users@lists.osgeo.org">mapguide-users@lists.osgeo.org</a>
<br>
<a 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>
</body>
</html>