locate a shape and change size according to zoom level

4 posts, 0 answers
  1. S
    S avatar
    2 posts
    Member since:
    Jan 2015

    Posted 04 Feb 2015 Link to this post

    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..

  2. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 09 Feb 2015 Link to this post

    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.

     
  3. UI for WPF is Visual Studio 2017 Ready
  4. S
    S avatar
    2 posts
    Member since:
    Jan 2015

    Posted 09 Feb 2015 in reply to Pavel R. Pavlov Link to this post

    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?

  5. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 12 Feb 2015 Link to this post

    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.

     
Back to Top