MapEllipse center

2 posts, 1 answers
  1. Henri
    Henri avatar
    74 posts
    Member since:
    Aug 2008

    Posted 21 Dec 2010 Link to this post

    I am sorry but I find the use of the mapellipse very confusing.
    Here a part of the xaml:, how can i have the center of the ellipse on the location instead of the topleft of the ellipse?

                <!-- a second layer, displaying a 100km circle -->
                <!-- how do i center the ellipse ? -->
                <telerik:InformationLayer
                    Name="informationLayerCheck">
                    <telerik:MapEllipse
                        Location="51.191863, 4.552259"
                        Width="100.0" Height="100.0"
                        Fill="#22000000"
                        Stroke="Orange"
                        StrokeThickness="1"
                        >
                    </telerik:MapEllipse>
                </telerik:InformationLayer>






    Thanks for your help.
    Henri
  2. Answer
    Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 23 Dec 2010 Link to this post

    Hi Henri,

    The MapEllipse is located at the top-left point the same as the standard Ellipse shape in Silverlight.
    You can use MapPath with MapEllipseGeometry instead. The MapEllipseGeometry is positioned using its center location like the EllipseGeometry in Silverlight.
    The sample code is below.
    <telerik:InformationLayer Name="informationLayerCheck">
        <telerik:MapPath Fill="#22000000"
                 Stroke="Orange" StrokeThickness="1">
            <telerik:MapPath.Data>
                <telerik:MapEllipseGeometry Center="51.191863, 4.552259"
                               RadiusX="100.0" RadiusY="100.0" />
            </telerik:MapPath.Data>
        </telerik:MapPath>
    </telerik:InformationLayer>

    Regards,
    Andrey Murzov
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  3. DevCraft banner
Back to Top