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

RadMap URIImageProvider Binding

7 Answers 192 Views
Map
This is a migrated thread and some comments may be shown as answers.
Josh
Top achievements
Rank 1
Josh asked on 28 Nov 2012, 08:28 PM
Hi, I'm trying to Bind the GeoBound Properties to my ViewModel, and it is working properly for the GeoBoundsNW and GeoBoundsSE for the RadMap properties, but when I try and bind the GeoBoundsNW and GeoBoundsSE properties inside the UriImageProvider, they are never updated.

<telerik:RadMap x:Name="radmap" Margin="0" GeoBoundsNW="{Binding GeoBoundsNw, Mode=TwoWay}" Center="30.402077, -81.524325" GeoBoundsSE="{Binding GeoBoundsSe, Mode=TwoWay}" MinZoomLevel="13" MaxZoomLevel="20" ZoomLevel="16"  NavigationVisibility="Collapsed"  ZoomBarPresetsVisibility="Collapsed" DataContext="{Binding CurrentMap}" MouseClickMode="None">
 
<telerik:RadMap.Providers>
 <telerik:UriImageProvider GeoBoundsNW="{Binding GeoBoundsNw, Mode=TwoWay}"  GeoBoundsSE="{Binding GeoBoundsSe, Mode=TwoWay}" GeoBounds="{Binding GeoBounds, Mode=TwoWay}"  Uri="my uri"  telerik:MapLayer.ZoomRange="13,20" MinZoomLevel="13" MaxZoomLevel="20" />
 </telerik:RadMap.Providers>
 
                        </telerik:RadMap>

When I debug and step through, the RadMap itself is binding properly, just the UriImageProvider properties.  Any ideas?

7 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 30 Nov 2012, 04:02 PM
Hello Josh,

Unfortunately UriImageProvider does not support the dynamic changing of geobounds. We already have a PITS item about support for dynamic geographical region in the UriImageProvider. You can track the implementation using the following link:
http://www.telerik.com/support/pits.aspx#/public/silverlight/6570

Best regards,
Andrey Murzov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Zi
Top achievements
Rank 1
answered on 09 Jul 2013, 06:20 AM
hi,Andrey

I follow the documentation about the UriImage provider, but the result turn out all background with grey, not the image uri I want to show.
Coding here:

       <telerik:RadMap x:Name="radMap2"
                        Visibility="Collapsed"
                        Center="42.72481708629, 23.3176519378416"
                ZoomLevel="10" 
                MinZoomLevel="10" 
                MaxZoomLevel="14" 
               
                NavigationVisibility="Visible"
                ZoomBarVisibility="Visible"
                CommandBarVisibility="Visible"
                      
                       
                        >
            <telerik:RadMap.Provider>
                <telerik:UriImageProvider GeoBounds="42.786, 23.17, 25, 14"  Uri="campus_floorplan;component/entrance.png" />
            </telerik:RadMap.Provider>
          
        </telerik:RadMap>

And I noticed that the sample"single Image provider" have this library
"xmlns:example="clr-namespace:Telerik.Windows.Examples.Map.Shapefile""
does it because I don't have this?

Thank you very much
0
Zi
Top achievements
Rank 1
answered on 09 Jul 2013, 06:24 AM
hi, Andrey
I follow the documentation about UriImage provider for single image shown, but I just got the grey full of background, not the image I want.
Coding here:

       <telerik:RadMap x:Name="radMap2"
                        Visibility="Collapsed"
                        Center="42.72481708629, 23.3176519378416"
                ZoomLevel="10" 
                MinZoomLevel="10" 
                MaxZoomLevel="14" 
               
                NavigationVisibility="Visible"
                ZoomBarVisibility="Visible"
                CommandBarVisibility="Visible"
                      
                       
                        >
            <telerik:RadMap.Provider>
                <telerik:UriImageProvider GeoBounds="42.786, 23.17, 25, 14"  Uri="campus_floorplan;component/entrance.png" />
            </telerik:RadMap.Provider>
          
        </telerik:RadMap>
And I noticed that in the sample "single image provider" have the library:
  "xmlns:example="clr-namespace:Telerik.Windows.Examples.Map.Shapefile"
Does it because I don't have this library?
0
Andrey
Telerik team
answered on 10 Jul 2013, 08:09 AM
Hello Zi,

The URI in your code has an error. If the "entrance.png" is a resource in your campus_floorplan Silverlight application the URI should start from the "/" (slash):

<telerik:UriImageProvider GeoBounds="42.786, 23.17, 25, 14"  Uri="/campus_floorplan;component/entrance.png" />

I will kindly recommend you to start from having a look at MSDN:

http://msdn.microsoft.com/en-us/library/system.uri(v=vs.95).aspx
http://msdn.microsoft.com/ru-ru/library/cc296240(v=vs.95).aspx
http://msdn.microsoft.com/ru-ru/library/system.windows.controls.image.source(v=vs.95).aspx
http://msdn.microsoft.com/en-us/library/cc189008(v=vs.95).aspx


Regards,
Andrey Murzov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Zi
Top achievements
Rank 1
answered on 10 Jul 2013, 11:42 AM
hi,Andrey,

Thanks a lot.
I try in that way, the problem solved! sorry for my mistakes.
  
However, I don't konw what is the "center" stands for...it is just a image, how to define the centre like longtitude and latitude..
I also want to know the "Geobounds" stands for.
Here is my project:
I want to build the single image map and with the information layer(pinponts) to show  the specify position for the map. Does it possible??
And I find that the URIIMage Provider just have a very simple sample for it. So I think I will got troublesome.
Did you have any similar sample for the URIImage provider map ??

Thank you for your patients answering my questions everyday.

0
Zi
Top achievements
Rank 1
answered on 10 Jul 2013, 12:23 PM
Sorry for coping the wrong code"visibility=Collapsed"
I already find that the reason why can't show image but a grey background is 
the C# code "UriImageMapProvider openStreetMap = new UriImage
MapProvider();this.radMap1.Provider = UriImageMap;" This code is not correct according to the UriImage Provider.

sorry for the careless mistakes
I am waiting for your reply with the detail information about the UriImage Provider.
thank you very much
0
Andrey
Telerik team
answered on 15 Jul 2013, 06:42 AM
Hello Zi,

It is very complicated and it is hard to reproduce the problem without your solution, but using just a code snippet you sent. Could you, please, provide us with your solution or with a small sample solution which reproduces it?

As for your questions about Center, GeoBounds and other properties. The RadMap always works with geographical coordinates. If you show a single image map then this image must have geographical position and size (your campus definitely is located somewhere in the world and have geographical coordinates and size). The GeoBounds sets geographical coordinates and size of the region covered by image in kilometers.

Regards,
Andrey Murzov
Telerik

TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
Map
Asked by
Josh
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Zi
Top achievements
Rank 1
Share this question
or