Bug 24981 - Android XF Maps BUG: Xamarin.Forms.Maps.Position(54.767683, -1.571671) doesn't work with European locale
Summary: Android XF Maps BUG: Xamarin.Forms.Maps.Position(54.767683, -1.571671) doesn'...
Status: RESOLVED FIXED
Alias: None
Product: Forms
Classification: Xamarin
Component: Forms ()
Version: 1.3.0
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-12-02 05:56 UTC by rjcollingham
Modified: 2015-05-26 11:37 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description rjcollingham 2014-12-02 05:56:09 UTC
Hi, setting map position with a decimal point isn't working for European locales. For example, my Android phone locale is en-GB and my location is shown fine, but using el-Gr (Greek) as the locale and the location comes out as Alaska.

I believe this is an issue with the underlying Google maps expecting european numbers with a comma instead of a decimal point (http://forums.xamarin.com/discussion/28029/android-player-gps-coordinates-issue) also here (http://stackoverflow.com/questions/18633301/google-maps-automatically-convert-period-into-comma-from-my-intent-uri)

Do you use a particular version of google maps inside XF Maps? If so, updating to the latest version might fix the issue. I tried just updating the maps app on the phone but that didn't work.

public class MapPage : ContentPage {
    public MapPage() {
        var map = new Map(
            MapSpan.FromCenterAndRadius(
                    new Position(54.767683, -1.571671), Distance.FromMiles(0.3))) {
                IsShowingUser = true,
                HeightRequest = 100,
                WidthRequest = 960,
                VerticalOptions = LayoutOptions.FillAndExpand
            };
        var stack = new StackLayout { Spacing = 0 };
        stack.Children.Add(map);
        Content = stack;
    }
}
Comment 1 Rui Marinho 2015-05-26 11:37:54 UTC
Fixed in 1.4.2