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

Width and Heght

1 Answer 62 Views
Map
This is a migrated thread and some comments may be shown as answers.
AngeIa AngeIa
Top achievements
Rank 1
AngeIa AngeIa asked on 20 Jun 2010, 07:27 PM
Всем привет.

У меня два вопроса:
1. Можно ли для карт использовать кэш?
2. Например у меня карта размером 600 на 400 пикселей, в ней открыта Пермь (город). Я точно знаю (допустим), что где-то внутри карты у меня есть точка с координатами 58 и 56 градусов. Как мне узнать местоположение этой точки в пикселах (например 352 на 240)?

Hello.

I have two questions:
1. Is it possible for maps to use cache?
2. For example I have a map size of 600 by 400 pixels, it is open Perm (city). I know (say), that somewhere inside the map I have a point with coordinates 58 and 56 degrees. How do I know the location of this point in pixels ( for example 352 to 240)?

1 Answer, 1 is accepted

Sort by
0
Accepted
Andrey
Telerik team
answered on 21 Jun 2010, 10:00 AM
Hi AngeIa,

1. Unfortunately, the cache of tiles is not available in the Silverlight version of map control. The MultiScaleImage class we use as a base of our control does not allow to do it. The tiles (such as other downloaded images) are cached according to the browser's cache politic.

2. The Location class has the GetPoint method that returns the pixel point on the map. You can create the Location instance and then obtain the point.
Please, see the sample code below.

Location location = new Location(58, 56);
Point point = location.GetPoint(this.radMap);

1. К сожалению, кэширование изображения карты недоступно в Silverlight версии компоненты. Класс MultiScaleImage, на котором базируется наша компонента, не позволяет это сделать. Части изображения карты (так же как любые другие загруженные картинки) кэшируются согласно настройке кэширования в браузере.

2. Класс Location содержит метод GetPoint, который возвращает точку на карте в пикселях. Вы можете создать экземпляр класса Location и затем получить точку.
Код примера смотрите выше.

Kind regards,
Andrey Murzov
the Telerik team


Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Map
Asked by
AngeIa AngeIa
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or