[mapguide-users] buffer feature create. around added point.

Maciej Skorczewski maciej.skorczewski at procad.pl
Mon Jan 15 05:49:24 EST 2007


I add some points to map  (code in PHP)
When point is created i want to create a buffer around this point...when 
i make it i get this error.

--start error message---
1 layers were excluded from buffer computation because their coordinate 
systems are incompatible with the coordinate system of the map, or 
because they have no coordinate system at all
--end error message---

so where can i set valid coordinate system? My map use
- *XY-M* (Arbitrary X-Y Coordinates (Meters))-.

//Creating the point
// $x , $y come from database
$geometryFactory = new MgGeometryFactory();
$coordinate = $geometryFactory->CreateCoordinateXY($x,$y);
$point = $geometryFactory->CreatePoint($coordinate);

//Define a property collection

$geometryReaderWriter = new MgAgfReaderWriter();
$properties = new MgPropertyCollection();
$properties->Add(new MgInt32Property('Id_obiektu',''.$id.''));
$properties->Add(new MgStringProperty('Typ',''.$typ_obiektu.''));
$properties->Add(new MgGeometryProperty('SHPGEOM', 

//Create an insert command for this property.

$parcelMarkerCommands->Add(new MgInsertFeatures('Obiekty', $properties));

if ($parcelMarkerCommands->GetCount() > 0)
$parcelMarkerCommands, false);


          $sessionIdName = "Session:$mgSessionId//gdansk2.Map";
          $sessionResourceID = new MgResourceIdentifier($sessionIdName);
          $map->Save($resourceService, $sessionResourceID);
          $mapUpdated = true;




More information about the mapguide-users mailing list