Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding convenience streetAddress property #204

Open
wants to merge 1 commit into
base: main
from

Conversation

@Skoti
Copy link

@Skoti Skoti commented Feb 13, 2020

Hi

I would like to add a convenience streetAddress property for MBPlacemark.

I have noticed that for .address features name property contains only a street name and the house number is contained in address property.
The formattedName property already does it correctly (as it is defined as a street address for .address features), and also handles house number correctly putting it before or after a street name. So I have just extracted this logic into a separate method.
For non-address features I use the logic from addressDictionary which looks for an address first in properties?.address and then address property.

@Skoti Skoti requested a review from frederoni Feb 20, 2020
@frederoni
Copy link
Contributor

@frederoni frederoni commented Feb 21, 2020

Thank you for your contributions. I added @1ec5 as a reviewer as I believe he has more context.

@frederoni frederoni requested a review from 1ec5 Feb 21, 2020
@Skoti
Copy link
Author

@Skoti Skoti commented Apr 14, 2020

Any chance to start a review?

@JLZ
Copy link

@JLZ JLZ commented Aug 13, 2020

I'd love to see this get reviewed and merged. As it stands now, if I want to create an address with custom formatting, I have 2 options (neither are great):

  1. Parse MBPlacemark.qualifiedName
  2. Use the address and name properties for street address and dig into postalAddress to get city, state, zip info. It doesn't make sense to have to use bits of data from both objects to build an address.

This PR solves this problem in one way. Another option would be to add the address number to MBPlacemark.postalAddress.street. Then, an address could be pieced together using the postalAddress (CNPostalAddress) property alone.

@1ec5 1ec5 changed the base branch from master to main Oct 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.