This is a migrated thread and some comments may be shown as answers.

Animation of objects on information layer

2 Answers 75 Views
Map
This is a migrated thread and some comments may be shown as answers.
FieldTRAKS
Top achievements
Rank 1
FieldTRAKS asked on 30 Mar 2011, 09:55 PM
I have just begun porting our code from our old map viewer to your control. Is there anyway to disable the weird animation that happens whenever I use the zoom controls on the map. My polygons align nicely but as soon as you zoom they fly out to the edge and then settle back to where they should be. This is really undesirable for my users. The polygons should stay aligned at all times even through a zoom. I have never encountered anything like this in a GIS viewer before.

...here is some sample code on how I am add the polygon


            LocationCollection points = new LocationCollection();



            points.Add(new Location(45.133, -75.7396));

            points.Add(new Location(45.1336, -75.738 ));
            points.Add(new Location(45.1338, -75.7375));
            points.Add(new Location(45.1336, -75.7373));
            points.Add(new Location(45.1321, -75.7367 ));
            points.Add(new Location(45.1315, -75.7382));
            points.Add(new Location(45.133, -75.7396));
            points.Add(new Location(45.133, -75.7396 ));
            points.Add(new Location(45.1334, -75.7355));
            points.Add(new Location(45.1333, -75.7355));
            points.Add(new Location(45.1325, -75.7358));
            points.Add(new Location(45.1349, -75.7297));
            points.Add(new Location(45.1365, -75.7308));
            points.Add(new Location(45.135, -75.7345));
            points.Add(new Location(45.1348, -75.7346));
            points.Add(new Location(45.1349, -75.7349 ));
            points.Add(new Location(45.1347, -75.7354));


            points.Add(new Location(45.1334,-75.7355 ));
            //// Inner polygon
            //points.Add(new Location(41.9, -121.9));
            //points.Add(new Location(41.9, -121.6));
            //points.Add(new Location(41.6, -121.6));
            //points.Add(new Location(41.6, -121.9));
            //points.Add(new Location(41.9, -121.9));

            MapPolygon polygon = new MapPolygon()
            {
                Fill = new SolidColorBrush(Colors.Red),
                Points = points
            };
            map.Items.Add(new InformationLayer());
            ((InformationLayer)map.Items[0]).Items.Add(polygon);

2 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 01 Apr 2011, 09:56 AM
Hi Matt Fraser,

I'm sorry, but we aren't able to reproduce the problem. I've added your code to a quite simple RadMap application and all things work just fine. The polygons stay aligned. The behavior you've described looks similar to the probelm which was reported few times for the 2010.Q3 release (before SP1). But it was fixed a long time ago. Could you, please, check that you definetely use lates release (Q1 2011) of the Telerik DLLs in your project? If it is so, could you, please send small solution which we can use to reproduce the problem?

Greetings,
Andrey Murzov
the Telerik team
0
FieldTRAKS
Top achievements
Rank 1
answered on 01 Apr 2011, 01:12 PM
I actually figured it out myself....I needed to set the following property on the map viewer

UseSpringAnimations="False"

Then that irritating bouncing of the polygons stops.
Tags
Map
Asked by
FieldTRAKS
Top achievements
Rank 1
Answers by
Andrey
Telerik team
FieldTRAKS
Top achievements
Rank 1
Share this question
or