I got another question.
I include Openstreetmaps via
<ig:XamMap.MapTileSource><ig:OpenStreetMapTileSource x:Name="openStreetsTileSource" /></ig:XamMap.MapTileSource>
But the maximum zoom factor is smaller than in the internet on openstreetmaps.org
Additionally it's not that sharp like on the website
I think I just cannot get the last step.
thanks,
henning
Thank you.
Yes I am using 11.1
I commented out all my other code but i did not work. Your application did work.
but then I find the reason why it isn't working:
im my XAML Code i have the following in the <ig:XamMap>
<ig:XamMap.Layers> <ig:MapLayer x:Name="mapLayer" FillMode="RandomInterpolate" Brushes="red orange blue"> </ig:MapLayer> </ig:XamMap.Layers>
Without these lines of code it is working properly. I did not think that this would have an effect on zooming.
Is this normal, or should it wotk nevertheless?
if I add tjhe following to your sample code, it does also not work correctly:
<ig:XamMap.Layers> <ig:MapLayer > </ig:MapLayer> </ig:XamMap.Layers>
EDIT:
it does even not work if i left this piece of code out and add layers programaticlly with:
Dim roadLayer As New MapLayer() roadLayer.LayerName = "roadLayer" roadLayer.StrokeThickness = 2 reader = New ShapeFileReader() reader.Uri = "/../../Shapefiles/rivers" converter = New DataMapping.Converter() reader.DataMapping = TryCast(converter.ConvertFromString("Caption=NAME; ToolTip=NAME"), DataMapping) roadLayer.Reader = reader theMap.Layers.Add(roadLayer)
Thanks for your help!
Please find the sample application with the code we discussed so far. Would you try to run it and see if it works for you? The one thing that needs to be done to get it working is to add Infragistics dlls.
One more thing - are you using 11.1 version of the control?
Thanks,Milana Zhileva
I found nothing that could effect it.
that is my Initcoordinates method, which is called when the window is loaded, maybe there could be a fault?:
Private Sub InitMapCoordinates() ' Convert define world dimensions Dim worldTopLeft As Point = New Point(-180, 90) Dim worldBottomRight As Point = New Point(180, -90) ' Convert Geodetic to Cartesian coordinates Dim winTopLeft As Point = Me.theMap.MapProjection.ProjectToMap(worldTopLeft) Dim winBottomRight As Point = Me.theMap.MapProjection.ProjectToMap(worldBottomRight) ' Create Rect structure the map control's WindowRect and WorldRect Dim winRect As New Rect() winRect.X = Math.Min(winTopLeft.X, winBottomRight.X) winRect.Y = Math.Min(winTopLeft.Y, winBottomRight.Y) winRect.Width = Math.Abs(winTopLeft.X - winBottomRight.X) winRect.Height = Math.Abs(winTopLeft.Y - winBottomRight.Y) Me.theMap.IsAutoWorldRect = False ' Change the map control's WindowRect and WorldRect Me.theMap.WorldRect = winRect Me.theMap.WindowRect = winRect End Sub
Thank you for the sample code.
I tried to reproduce the issue, using the xaml you provided and WindowZoomMaximum="80" but I wasn't able.
Application, using your xaml:
Openstreetmaps:
Would you please check if you set WindowZoomMaximum again somewhere in your code behind or if there is some other detail in CB that might affect this?
Best regards,Milana Zhileva
Yepp thanks:
my code to import the openstreetmaps:
<ig:XamMap x:Name="theMap" WindowAnimationMode="Linear" IsAutoWorldRect="false" MapProjectionType="SphericalMercator" Loaded="theMap_Loaded" WindowZoomMaximum="10000"> <ig:XamMap.MapTileSource> <ig:OpenStreetMapTileSource x:Name="openStreetsTileSource" /> </ig:XamMap.MapTileSource> <ig:MapNavigationPane x:Name="theNavigationPane" ig:XamDock.Edge="InsideRight" Margin="15" /> <ig:MapThumbnailPane Width="200" Height="100" HorizontalAlignment="Center" Margin="27,189,276,22" Background="Transparent" ig:XamDock.Edge="InsideBottom"/> <ig:MapScalePane Height="50" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="72,12,0,0" Name="MapScalePane1" Width="100" DisplayMode="Bar" Focusable="True" /> </ig:XamMap>
and now two pictures for comparison
Openstreetmaps.org:
My Own application: