Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Geocoding API's #28

Closed
mattleibow opened this issue Feb 25, 2018 · 3 comments
Closed

Geocoding API's #28

mattleibow opened this issue Feb 25, 2018 · 3 comments
Assignees
Milestone

Comments

@mattleibow
Copy link
Contributor

mattleibow commented Feb 25, 2018

A simple way to convert from a position to an address.

Geolocation API's: #7

_NOTE: the Position type is used from #7 _

static class Geocoding {
    // Requires a map key string on UWP
    // should throw an exception on UWP if this isn’t specified via the static MapKey property.
    static Task<IEnumerable<Address>> GetAddressesAsync(Position position);
    static Task<IEnumerable<Position>> GetPositionsForAddressAsync(string address);
}

// UWP-only partial
static class Geocoding {
    // UWP Only, and should only be in the UWP assembly
    // Users can call `Geolocation.MapKey = "blah"` from their UWP specific code (like where Inits are called).
    static string MapKey { get; set; }
}
class Address{
    double Latitude { get; set; }
    double Longitude { get; set; }

    string AdminArea { get; set; }
    string CountryCode { get; set; }
    string CountryName { get; set; }
    string FeatureName { get; set; }
    string Locality { get; set; }
    string PostalCode { get; set; }
    string SubAdminArea { get; set; }
    string SubLocality { get; set; }
    string SubThoroughfare { get; set; }
    string Thoroughfare { get; set; }
}
@mattleibow mattleibow added this to the Preview-1 milestone Feb 25, 2018
This was referenced Feb 25, 2018
@jamesmontemagno
Copy link
Collaborator

jamesmontemagno commented Feb 25, 2018

Also should add:

Task<IEnumerable<Position>> GetPositionsForAddressAsync(string address);

Also required MapKey on UWP.

@jamesmontemagno jamesmontemagno self-assigned this Feb 25, 2018
@jamesmontemagno
Copy link
Collaborator

I'll take this as I personally implemented it in my plugin

mattleibow added a commit that referenced this issue Mar 1, 2018
Implementation of Geocoding #28
@mattleibow
Copy link
Contributor Author

This has been merged into master with 9811d12

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants