Skip to content

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

@svoff

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}";
        }

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