TatukGIS menu

Knowledge Base





KB10348 - Display a point from a database on the map.

Create a TGIS_LayerVector layer and then, on each database query, add the following code:

layer.RevertAll ; // will reset layer status while not ors.Eof do begin
 while not ors.Eof do begin
  shp := layer.CreateShape( gisShapeTypePoint ) ;
  shp.Lock( gisLockExtent ) ;
  shp.AddPart ;
  shp.AddPoint( GisPoint( ors.Fields['X'] , ors.Fields['Y'] ) );
  shp.Unlock ;
  shp.SetField( 'somefield', ors.Fields['somefield'] ) ;
  ors.MoveNext ;
 end ;
end ;
Created: August 30, 2004, Modified: August 03, 2015