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

How to set the telerik:MapLayer.Location property for a FrameworkElement in code-behind?

1 Answer 175 Views
Map
This is a migrated thread and some comments may be shown as answers.
Mrn
Top achievements
Rank 1
Mrn asked on 29 Aug 2011, 04:53 PM
Hello,

I'd like to add a set of images I create dynamically in code behind to an InformationLayer that is already defined in XAML, but I don't know how can I set its properties related to MapLayer when I create them in code behind (MapLayer.Location, ZoomRange and BaseZoomLevel)... how could I do so?

Thanks! 

1 Answer, 1 is accepted

Sort by
0
Accepted
Andrey
Telerik team
answered on 01 Sep 2011, 11:46 AM
Hello Mrn,

You can use the appropriate static methods of the MapLayer class. The sample code is below.
MapLayer.SetLocation(frameworkElement, new Location(40, -100));
MapLayer.SetBaseZoomLevel(frameworkElement, 8);
MapLayer.SetZoomRange(frameworkElement, new ZoomRange(8, 11));

Regards,
Andrey Murzov
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

Tags
Map
Asked by
Mrn
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or