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
Hi henning,
In this case, to change the maximum zoom depth value, you can set XamMap's WindowZoomMaximum property to the desired value.
Hope that helps,Milana Zhileva
Thanks for the answer, but even if i set this to 100000 it does not change anything. Any other possibilities?
Thank you
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:
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
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
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
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!
Hello Henning,
We have been looking into your requirement and since our Data Visualization controls are cross-platform, in order to provide means of creating consistent WPF and Silverlight counterparts of a project, we have had to comply with a Silverlight rendering limitation. However we have decided that it would be a good improvement to have this fixed for the WPF controls and so I have logged this with development under ID: 86295 and I have also created a support ticket on your behalf: CAS-72144-TNYQGW and have linked the development issue to it, so that you can get automatically updated, when a Service Release containing the fix is available for download. You can get the new version from our website’s “My IG”, “My Keys & Downloads” tags: https://ko.infragistics.com/Membership/Default.aspx?panel=Downloads#Downloads
You can also monitor the support ticket’s progress through the “My Support Activity” tag: https://ko.infragistics.com/Membership/MySupport.aspx
Thank you very much!
Hi Henning,
I have contacted our Development support team on your behalf and they will try to resolve the issue.
Regards,
Ivan Kotev
Hi,
thanks for your answer.
I thougt the xammap is made for adding mapelements, isn't it? an empty geo-imaginery map I can view in the internet.
Is the restriction also on bingmaps or just on openstreetmap? Cause this restricted ZoomFactor won't be enough for our goals.
i will make a request for opening this restriction, any clue, how long such request will last, so is it worth waiting for it?
Kind regards
Henning
Hi again,
By XamMap's design, when MapElements are added to a МapLayer, the WindowZoomMaximum is restricted to a specific value, so the behaviour you observe is normal. When only tile source is used, as it is the case in the sample application I sent, there is no such restriction.
If you like, you can submit a feature request on implementing this functionality, using the following form:http://devcenter.infragistics.com/protected/requestfeature.aspx
Best Regards,Milana Zhileva