Show search result "slow" or as a movie

Topics: SharpMap Project, SharpMap v0.9 / v1.x
Mar 16, 2010 at 8:24 PM

Hi all, first time poster here.

I implemented search :

 

sf.FilterDelegate =  delegate(FeatureDataRow row)
            {
               
                if (row["Naziv_ulic"].ToString() == QStringTextBox.Text)
                {
                    if (bx == null)
                        bx = row.Geometry.GetBoundingBox();
                    else
                        bx = bx.Join(row.Geometry.GetBoundingBox());
                    
                    return true;
                }
                return false;
            };
            result.DataSource = sf;
            
            mapImage.Map.Layers.Add(result);
           
            mapImage.Refresh();
           
            mapImage.Map.ZoomToBox(bx);
            mapImage.renda;
            mapImage.Refresh();

sf.FilterDelegate =  delegate(FeatureDataRow row)

            {

           if (row["Naziv_ulic"].ToString() == QStringTextBox.Text)

{

                    if (bx == null)

                        bx = row.Geometry.GetBoundingBox();

                    else

                        bx = bx.Join(row.Geometry.GetBoundingBox());

 

                    return true;

                }

                return false;

            };

            mapImage.Map.ZoomToBox(bx);

           mapImage.Refresh();

Its works fine, But I am not happy that I get directly into bx region.Too fast and it's unclear from what part of the map search result is.

It possible to realize "Show search result slow or as a movie"? 

Thanks,


 

Coordinator
Mar 17, 2010 at 12:02 PM

Hi Novotom, there is no built in animation but it would be fairly easy to implement yourself - as long as the map is simple enough to render reasonably quickly. All you need is a timer and a function that moves the center and zoom or bounding box of the map in steps.

hth jd