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

OpenStreetMapProvider - size

1 Answer 72 Views
Map
This is a migrated thread and some comments may be shown as answers.
Anatoly Chekh
Top achievements
Rank 1
Anatoly Chekh asked on 23 Mar 2011, 11:33 AM
Hello!

I have a question:

We have control with map component in it. Size of the control is: width = 780, height = 630. By default map center is (0,0), zoomlevel is 1.
In this case the map looks as square. So we have empty space in out control (see attachment)

We use OpenStreetMapProvider.

Can we can fix this problem. If can - how?

And the second question: how can I get real size in pixel of the map with current zoom?

Thanks, Anatoly Chekh.

1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 25 Mar 2011, 09:43 AM
Hello Anatoly Chekh,

It is expected behavior for the map control. Currently you can only limit the min zoom level value to 2 to enlarge the size of control.
<telerik:RadMap x:Name="radMap"
 Center="0,0"
 MinZoomLevel="2"
 ZoomLevel="2">
<telerik:RadMap>

For calculation the width and height of whole map in pixels you can use the following formula:
2 ^ (ZoomLevel + 8)

Greetings,
Andrey Murzov
the Telerik team
Tags
Map
Asked by
Anatoly Chekh
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or