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

Map mirrored in right to left flow direction

6 Answers 35 Views
Map
This is a migrated thread and some comments may be shown as answers.
Sayyed Hossein
Top achievements
Rank 1
Sayyed Hossein asked on 20 Aug 2018, 05:23 AM

i have two problems in using map control in right to left

i am using a custom map tile provider

the flow direction of my application is right to left when i open the map control my map tiles are mirrored all the streets and texts and ... are reverse as if i have put the image in front of a mirror. to relieve that issue i put the flow direction of the rad map to left to right. now i have my second problem! when i want to export the map view as a png file the exported file is mirrored!

is this a known issues or am i doing something wrong ?

thx in advance for your help

6 Answers, 1 is accepted

Sort by
0
Dilyan Traykov
Telerik team
answered on 22 Aug 2018, 03:58 PM
Hello Sayyed,

Thank you for reporting this issue. It does seem like a bug at our end and that is why I've logged the following bug report in our feedback portal to which you can subscribe. As a thank you for your help in addressing this issue, I've awarded you with some Telerik points.

I do hope you find the workaround of applying a LeftToRight FlowDirection to the RadMap control directly applicable for the time being.

As for the related issue of the ExportToImage method flipping the image, you can work around that as well by changing the flow direction of the map prior to calling the method and switching it back afterwards.

private void RadButton_Click(object sender, RoutedEventArgs e)
{
    radMap.FlowDirection = FlowDirection.RightToLeft;
    radMap.ExportToImage("../../map-image.png", true, encoder: new PngBitmapEncoder());
    radMap.FlowDirection = FlowDirection.LeftToRight;
}

Please let me know whether such an approach works for you as well.

Regards,
Dilyan Traykov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Sayyed Hossein
Top achievements
Rank 1
answered on 02 Sep 2018, 07:14 AM

hi thank you very much for your answer

this is the exact path i took after encountering this problem but then i hit another issue

after changing map flow direction to right to left before exporting and then setting it back to left to right the resulted png file's map is ok (not mirrored) BUT...

i have a visualization layer on top of the map with itemtemplate set to a usercontrol(forexample "testcontrol"). the "testcontrol"'s flow direction is right to left

after export the map itself is ok but the items are now mirrored

0
Dilyan Traykov
Telerik team
answered on 05 Sep 2018, 01:56 PM
Hello Sayyed,

Could you please also try setting the FlowDirection of the visualization layer itself prior to the export and bringing it back afterwards and see if that solves the issue?

I will be awaiting your reply.

Regards,
Dilyan Traykov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Sayyed Hossein
Top achievements
Rank 1
answered on 22 Sep 2018, 11:03 AM

hi thank you for your reply and sorry for my delay

i tested changing the flow direction of visualization layers prior to exporting and it didn't work(still mirrored objects on map).

and after that i found out the after changing FlowDirection of the map control it actually changes flow direction of its visualization layers itself so there is no need to do it again manually

0
Accepted
Dilyan Traykov
Telerik team
answered on 26 Sep 2018, 03:46 PM
Hello Sayyed,

After further investigating this I've come up with the following approach you can try.

this.grid.FlowDirection = FlowDirection.LeftToRight;
 
Dispatcher.BeginInvoke(new Action(() =>
{
    radMap.ExportToImage("../../map-image.png", true, encoder: new PngBitmapEncoder());
 
    this.grid.FlowDirection = FlowDirection.RightToLeft;
}), DispatcherPriority.Render);

Note that "grid" in this case is the name of the parent control the RadMap is placed inside.

Please give this a try and let me know if it solves the issue at your end.

Regards,
Dilyan Traykov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Sayyed Hossein
Top achievements
Rank 1
answered on 29 Sep 2018, 08:14 AM

thank you very much dear dilyan this workaround fixed it.

looking forward to the complete resolving of the bug

Tags
Map
Asked by
Sayyed Hossein
Top achievements
Rank 1
Answers by
Dilyan Traykov
Telerik team
Sayyed Hossein
Top achievements
Rank 1
Share this question
or