Skip to content

Using the Directions API with GeoCoordinatesLocation fails in Swedish locale #9

Description

@svoff

In the Swedish locale, floating point numbers use ',' rather than '.'

That means that in the following code from Converter.cs, dots will be replaced by commas, which messes up the URL, and hence NOT_FOUND is returned from Google. Suggest using InvariantCulture or similar.

        // Geo coordinates location
        if (locationType.InheritsOrImplements(typeof (IGeoCoordinatesLocation)))
        {
            var coordinates = (IGeoCoordinatesLocation) location;
            return $"{coordinates.Latitude},{coordinates.Longitude}";
        }

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions