It is something stupid, but I cannot spot it...
Everything works if I omit the bold part of the code :

 function MakeLine($name, $x0, $y0 , $x1, $y1)
 {
   $propertyCollection = new MgPropertyCollection();
*    $cntr = (double) 11.0 ;
   $idProperty = new MgDoubleProperty("ID",$cntr);
   $propertyCollection->Add($idProperty);
*    $owner = "Aaa" ;
   $ownerProperty = new MgStringProperty("Owner", $owner);
   $propertyCollection->Add($ownerProperty);
   $nameProperty = new MgStringProperty("Purpose", $name);
   $propertyCollection->Add($nameProperty);
   $wktReaderWriter = new MgWktReaderWriter();
   $agfReaderWriter = new MgAgfReaderWriter();
   $agftext = "LINESTRING XY ($x0 $y0, $x1 $y1)" ;
   $geometry = $wktReaderWriter->Read( $agftext);
   $geometryByteReader = $agfReaderWriter->Write($geometry);
$geometryProperty = new MgGeometryProperty("Geometry", $geometryByteReader);
   $propertyCollection->Add($geometryProperty);
   return $propertyCollection;
 }

MG Studio says this property is Double

Stefan Dalakov


Kenneth Skovhede, GEOGRAF A/S wrote:
You could be affected by this bug:
http://trac.osgeo.org/mapguide/ticket/649

Otherwise, try to post a section of the code,
maybe someone will spot something obvious.

Regards, Kenneth Skovhede, GEOGRAF A/S



Stefan Dalakov skrev:
Hi all,
I am trying to add a feature (permanently) to a data source.
I am using MGOS 1.2 and tried Sheboygan samples, where this part is not working, I have not explored the reason yet. My idea is to digitize a feature ( a line ) and add it permanently to an existing layer on the map. I wrote some code, and everything seems OK, no errors, but at the end I have no feature added.
Can someone help with a piece of code ?

Thanks in advance
Stefan Dalakov
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users


_______________________________________________
mapguide-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/mapguide-users

Reply via email to