Прошу помочь новичку советом.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />
В документации Getting Started with MapObjects LT2.0 using Delphi 5.0
приведен следующий пример:
//check for the enter key
if (key=#13) then
begin
//build a search expression
exp:='STATE_NAME ='''+Edit1.Text+'''';
lys:=MapLT1.Layers;
layer:=IMoMapLayer(CreateOleObject('MapObjectsLT2.MapLayer'));
layer:=IMoMapLayer(lys.Item('STATES'));
//perform the search on the STATES layer
recs:=layer.SearchExpression(exp);
//show the results, if any
if (not recs.EOF) then
begin
fields:=recs.Fields;
//get the shape geometry
shp:=IMoPolygon(IDispatch(fields.Item('Shape').Value));
//flash the state
MapLT1.FlashShape(shp,3);
//create a rectangle based on the extent of the state
rect:=IMoRectangle(CreateOleObject('MapObjectsLT2.Rectangle'));
rect:=shp.Extent;
rect.ScaleRectangle((2.0));
<SPAN lang=EN-US style="FONT-SIZE: 10pt; FONT-FAMILY: Arial; ms