Draw circle (margin) on map

4 posts, 0 answers
  1. Gilbert van Veen
    Gilbert van Veen avatar
    68 posts
    Member since:
    Oct 2009

    Posted 30 Jun 2015 Link to this post

    Hi,

    I have a RadMap which is showing several hotspots. A hotspot is an area where (in my case) an employee is granted access.

    On the RadMap each access point is showed with the exact geolocation information but in fact there is a little margin.

    Per access point there is a margin (in meters). In other words an employee is granted access on geolocation xx.xx with a margin (radius/distance) of n meters.

    It would be nice if it is possible to draw a circle around the access point which shows the margin?

    Is this possible? and is there an example how to achieve this.

    See the attached image for the example.

    Thanks in advance,

  2. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 02 Jul 2015 Link to this post

    Hello Gilbert,

    RadMap gives you the ability to use databinding both in Information layer or Visualization Layer. By defining itemTemplate you are able to define Ellipse / Path or other Framework elements which will suit your needs. Please review the following approach.

    RadMap VisualizationLayer Data Binding

    Regards,
    Petar Mladenov
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
  4. Gilbert van Veen
    Gilbert van Veen avatar
    68 posts
    Member since:
    Oct 2009

    Posted 03 Jul 2015 in reply to Petar Mladenov Link to this post

    Thanks for the reply.

    I can draw a circle on the hostpot but how can calculate the correct size of the circle?

    The circle is a "margin/area" around the hotspot.

    Back to my example, on the RadMap is an image (hotspot) which indicates that there is an access zone. In the properties off the access zone the user can enter margin in meters. What I need is an option to draw a circle around the hotspot (access zone) which indicates margin.

     So the user can see the access zone on the map including an extra circle which shows the margin around the zone.

    The circle should have the correct scale.

     

     

  5. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 07 Jul 2015 Link to this post

    Hello Gilbert,

    To Draw a circle in RadMap you can use one of the following approaches:

    - Use FrameworkElement (Ellipse or Path or other) and place it in Information Layer  or Visualization layer. To Position it you should use the attached property MapLayer.Location:
    telerik:InformationLayer x:Name="informationLayer">
            <Ellipse x:Name="Ellipse1"
                        telerik:MapLayer.BaseZoomLevel="5"
                        telerik:MapLayer.Location="42.6957539183824, 23.3327663758679"
                        telerik:MapLayer.ZoomRange="5,12"
    The negative effect here is that the Width and Height are specified in pixels.

    - Use MapShape Object in Information Layer. For example MapEllipse. Width and Height are dependent on the current distance unit in the map - Mile or kilometer.

    - Use ShapeData objects in VisualizationLayer. For example EllipseData. Widht and height are represented with spatial reference units (degrees by default).

    In all the given solutions you need to manually calculate the location and width and height of the ellipse. Please keep in mind that the position / location is top-left oriented. In other word the top left point of the ellipse's bounding rectangle (which is somethind virtual) is used. This example is somehow similar to what you need, however we have no sample that automatically positions circle around certain hot spot.



    Regards,
    Petar Mladenov
    Telerik
    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 Feedback Portal and vote to affect the priority of the items
Back to Top