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

Getting Started with UriImageProvider

3 Answers 33 Views
Map
This is a migrated thread and some comments may be shown as answers.
Edwin
Top achievements
Rank 1
Edwin asked on 05 Aug 2016, 02:24 PM

I know there's probably a simple solution to this problem but I cant find it for the life of me. Im trying to use RadMap in order to display a floor plan that I can later add points to similar to the demo shown here. The issue that im facing is that I cant get the Floor plan to appear. Ive tried using different images with different sizes and that has yet to yield any results when I run it I simply see a blank canvass with the coordinates. The floor plan is saved as a FloorMap.png and for now I have placed it in my desktop. I was not sure how to set the GeoBounds so I have left them as they appear in the sample used here

<UserControl x:Class="testingxaml.MainPage"
            HorizontalAlignment="Center" VerticalAlignment="Center"
             mc:Ignorable="d" d:DesignWidth="625" d:DesignHeight="629">
    <Grid x:Name="LayoutRoot">
 
        <telerik:RadMap x:Name="xRadMap"
                        NavigationVisibility="Collapsed"
                        ZoomBarVisibility="Collapsed"
                        CommandBarVisibility="Collapsed"
                        Center="42.72481708629, 23.3176519378416">
             
                         
            <telerik:RadMap.Provider>
                <telerik:UriImageProvider GeoBounds="42.786, 23.17, 25, 14" Uri=file:///C:/Users/*****/Desktop/FloorMap.png/>
            </telerik:RadMap.Provider>
        </telerik:RadMap>
    </Grid>
</UserControl>

 

3 Answers, 1 is accepted

Sort by
0
Dinko
Telerik team
answered on 10 Aug 2016, 01:34 PM
Hi Edwin,

Thank you for contacting us.

The image doesn't appear because you haven't set the ZoomLevel property of the RadMap. Basically, when you are using the UriImageProvider by design it require that you specify zoom level. In your case you can set to 10 for example:
<telerik:RadMap x:Name="xRadMap"
                NavigationVisibility="Collapsed"
                ZoomBarVisibility="Collapsed"
                CommandBarVisibility="Collapsed"
                Center="42.72481708629, 23.3176519378416"
                ZoomLevel="10">
 . . . . . . . . . .

Give it a try and let me know if it works for you.

Regards,
Dinko
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
0
Edwin
Top achievements
Rank 1
answered on 11 Aug 2016, 08:54 PM

I made the change that you suggested but its still not displaying anything.

Do i need to change anything within the .cs file?

0
Petar Mladenov
Telerik team
answered on 12 Aug 2016, 01:41 PM
Hi Edwin,

I am attaching a sample project in which RadMap shows Image with ImageProvider. Can you modify it with your settings and try to break it ? On your side, you can double check:

- the URI you give ; simply place Image with the same URI source next to the Map 
- the VS output for some binding  / other errors

Regards,
Petar Mladenov
Telerik by Progress
Do you need help with upgrading your AJAX, WPF or WinForms project? Check the Telerik API Analyzer and share your thoughts.
Tags
Map
Asked by
Edwin
Top achievements
Rank 1
Answers by
Dinko
Telerik team
Edwin
Top achievements
Rank 1
Petar Mladenov
Telerik team
Share this question
or