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

locate a shape and change size according to zoom level

3 Answers 161 Views
Map
This is a migrated thread and some comments may be shown as answers.
S
Top achievements
Rank 1
S asked on 04 Feb 2015, 11:42 PM
hello,

I need to dynamically mark on a map a few locations in the described way:
1. each location should be marked by a circle 
2. the center of the circle should be the location (latitude and longtitude)
3. and the radius of the circle needs to be 4KM (4000 meters) 

so when the user changes zoom level
the center of the circle should stay on the same exact location
and the radius should change according to the zoom level to reflect a 4KM at all times

i would also like the circles to be drawn dynamically, via code (not static file)  
and also fade out after, lets say, 15 seconds

is that possible?
should i use mapshape? or hotspots?
should i use information layer or dynamic layer
i am very confused with all the options
can you please make an example like that?

i need to know if radmap supports such a scenario
and can manage that

thank you very much
i realy hope this can be done..

3 Answers, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 09 Feb 2015, 09:11 AM
Hello,

To achieve your requirement you can try using the VisualizationLayer of the RadMap. More specifically you can use the EllipseData object

As for loading and fading the shapes, you should implement custom logic achieving that. The RadMap does not have that functionality out of the box.

I hope this information will get you started.

Regards,
Pavel R. Pavlov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
S
Top achievements
Rank 1
answered on 09 Feb 2015, 07:26 PM
well, the link you have provided states that - "the top left corner of the ellipse coinceds with the given location". 
so if i want to center to appear in a specific long-lat location i actually need to re-compute the location i give to the ellipseDataObject, depending on the radius..  and change it every time the zoom level changes - in order to keep the center of the circle in the correct location...
is that so?

do you have an example for that computation? 
i guess more than a few customers would like to be able to mark a location using a circle around it.
no easier way to achive that?

0
Pavel R. Pavlov
Telerik team
answered on 12 Feb 2015, 07:46 AM
Hi,

I have the feeling that you have not even tried to create a sample project on your side using the steps and the code from the article. The code is fully runnable and all you need to do is to create an empty project and paste the code in your main view.

If you have tried to create a sample project using the article you should have noticed that even though the location of the ellipse does not origin from its center, its position remains constant. No recalculation of its radius or location is needed. Once placed on the layer it is automatically sized based on the zoom level of the RadMap.

Regards,
Pavel R. Pavlov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Map
Asked by
S
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
S
Top achievements
Rank 1
Share this question
or