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

why a simple shape Incorrectly drawn?

1 Answer 77 Views
Map
This is a migrated thread and some comments may be shown as answers.
Reza
Top achievements
Rank 1
Reza asked on 22 Sep 2012, 11:01 AM
I want to draw a simple ellipse in radmap 
with width and height 
20000,
but incorrectly like 
an elongated oval is drawn Why do this?
Other shape like rectangle has same problem 
too.
I add a simple radmap:

       <telerik:RadMap x:Name="radMap">
            <telerik:RadMap.Provider>
                <telerik:EmptyProvider />
            </telerik:RadMap.Provider>
            <telerik:InformationLayer x:Name="informationLayer">
            </telerik:InformationLayer>
        </telerik:RadMap> In code behind:
            var newShape = new MapEllipse()
            {
                Location = new Location()
                {
                    Latitude = 50,
                    Longitude = -111,
                },
                Fill = new SolidColorBrush(Color.FromArgb (0xFF, 0xF0, 0xB5, 0x85)),
                Width = 20000,
                Height = 20000
            };
            this.informationLayer.Items.Add(newShape);
            radMap.Center = new Location( newShape.Location.Latitude, newShape.Location.Longitude);

1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 26 Sep 2012, 02:08 PM
Hello Reza,

It is expected behavior. The width and height of MapEllipse are assigned in kilometers or miles. RadMap uses the Mercator projection.
http://en.wikipedia.org/wiki/Mercator_projection
The Mercator projection distorts the size and shape of large objects, as the scale increases from the Equator to the poles, where it becomes infinite. So, the MapEllipse does not look always like standard ellipse when its width is equal its height.

Regards,
Andrey Murzov
the Telerik team

Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

Tags
Map
Asked by
Reza
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or