Upgrade to Pro — share decks privately, control downloads, hide ads and more …

ZIPでくれ - Apple謹製 geocoding/ reverse geocoding

notoroid
December 13, 2024

ZIPでくれ - Apple謹製 geocoding/ reverse geocoding

2024年12月札幌iPhoneアプリ開発懇談会勉強会資料

notoroid

December 13, 2024
Tweet

More Decks by notoroid

Other Decks in Technology

Transcript

  1. ࣗݾ঺հ w J1IPOFΞϓϦ։ൃऀ 9!OPUPSPJE  w ΞϓϦ։ൃऀྺ ʙ  w

    ΞϓϦ࡞࢛ͬͯ൒ੈل ೥౸ୡ  w झຯ͸ήʔϜ ൓ࣹਆܦ͕ਰ͑ͱ໨ͷർΕ͕ൈ͚ͳ͍
  2. ٯδΦίʔσΟϯά SFWFSTFHFPDPEJOH ͱ͸ w Ґஔ৘ใ Ң౓ܦ౓ ͔Βॅॴ΍஍໊ʹม׵͢Δϓϩηε w ରٛޠ ↔︎

    3FWFSTFHFPDPEJOH  w 'PSXBSEHFPDPEJOH w ஍໊ɺॅॴ͔ΒҢ౓ܦ౓ΛಘΔ w ஍ҬͰ͋Ε͹ଟ֯ܗͰࣔ͞ΕΔൣғ w ݐங෺ͳͲ͸఺
  3. ٯδΦίʔσΟϯά SFWFSTFHFPDPEJOH ͱ͸ HFPDPEJOH (FPDPEJOH 3FWFSTF (FPDPEJOH 'PSXBSEHFPDPEJOH w஍Ҭ͝ͱͷॅॴ MPDBMF

    ߟྀ wࠃ͝ͱʹߦ੓۠෼΍௨Γͷѻ ͍͕ҟͳΔ wFY4UBUF ౎ಓ෎ݝ रा ज्य ों  w໘Ͱࣔ͞ΕΔ஍Ҭͳͷ͔ w఺Ͱࣔ͞ΕΔ৔ॴͳͷ͔ w༣ศ൪߸
  4. ٯδΦίʔσΟϯά SFWFSTFHFPDPEJOH ͱ͸ HFPDPEJOH w஍Ҭ͝ͱͷॅॴ MPDBMF ߟྀ wࠃ͝ͱʹߦ੓۠෼΍௨Γͷѻ ͍͕ҟͳΔ wFY4UBUF

    ౎ಓ෎ݝ रा ज्य ों  w໘Ͱࣔ͞ΕΔ஍Ҭͳͷ͔ w఺Ͱࣔ͞ΕΔ৔ॴͳͷ͔ w༣ศ൪߸ (FPDPEJOH 3FWFSTF (FPDPEJOH 'PSXBSEHFPDPEJOH
  5. $PSF-PDBUJPOᶃ Ґஔ৘ใશൠͷϑϨʔϜϫʔΫ w Ґஔ৘ใؔ࿈ͷϑϨʔϜϫʔΫ w *NQPSU$PSF-PDBUJPOͰར༻Մೳ w σόΠε J1IPOF J1BE

    "QQMF8BUDI ͷݱࡏ஍Λఏڙ w ϓϥΠόγʔೝূඞཁ w δΦίʔσΟϯάٯδΦίʔσΟϯάରԠ w ϓϥΠόγʔೝূෆඞཁ w ݕࡧ݁ՌΛ$-1MBDFNBSLͰฦ͢
  6. extension CLGeocoder { @available(iOS 11.0, *) open func geocodePostalAddress(_ postalAddress:

    CNPostalAddress, preferredLocale locale: Locale?, completionHandler: @escaping CLGeocodeCompletionHandler) } let postalAddress = CNMutablePostalAddress() postalAddress.postalCode = "001-0013" postalAddress.country = "JAPAN"
  7. ༣ศ൪߸͔ΒॅॴΛಛఆ͢Δᶄ ςΫχοΫ w ༣ศ൪߸͔ΒͷδΦίʔσΟϯάͰෆ଍ͨ͠ॅॴ TVC-PDBMJUZ ΛٯδΦίʔ σΟϯάΛ࢖ͬͯิ׬ΛࢼΈ͍ͯΔ ˟  δΦίʔσΟϯά

    4USJOH $-1MBDFNBSL ٯδΦίʔσΟϯά wMPDBUJPO wSFHJPO wDPVOUSZ wBENJOJTUSBUJWF"S FB wMPDBMJUZ wTVC-PDBMJUZ $-1MBDFNBSL wMPDBUJPO wSFHJPO wDPVOUSZ wBENJOJTUSBUJWF"S FB wMPDBMJUZ wTVC-PDBMJUZ wQMBDF1MBDFNBSL
  8. @available(iOS 9.0, *) open class CNPostalAddress : NSObject, NSCopying, NSMutableCopying,

    NSSecureCoding { var street: String { get } var subLocality: String { get } var city: String { get } var subAdministrativeArea: String { get } var state: String { get } var postalCode: String { get } var country: String { get } var isoCountryCode: String { get } open class func localizedString(forKey key: String) -> String } ༣ศ൪߸͔ΒॅॴΛಛఆ͢Δᶅ ᶃ౎ಓ෎ݝ ᶄࢢ ᶅࢢҎԼͷॅॴ ౎ಓ෎ݝɺࢢɺࢢҎԼͷॅॴΛಘΔ͜ͱ͕Ͱ͖Δ class CLPlacemark : NSObject, NSCopying, NSSecureCoding, @unchecked Sendable { ɹ… open var postalAddress: CNPostalAddress? { get } ɹ… }
  9. ᶄ͜ͷ೔ຊͷத৺Ͱ OPUFSSPSSFTQPOTFXIFOJOQVUXSPOHQPTUBMOVNCFS w ޡͬͨ༣ศ൪߸Λೖྗͨ͠৔߹ ਺஋Ҏ֎ɺܻະຬɺۭཝ ʹԿ͕ൃੜ͢Δ  w ❌Τϥʔ͕ฦ͞ΕΔ w

    ˓೔ຊͷத৺ॅॴΒ͖͠ॅॴ͕ฦ͞ΕΔ w ˟ذෞݝຊ૥ࢢࠜඌদా w ͪͳΈʹΞϝϦΧͷத৺͸,$Ϩόϊϯ
  10. @available(iOS 9.0, *) open class CNPostalAddress : NSObject, NSCopying, NSMutableCopying,

    NSSecureCoding { var street: String { get } var subLocality: String { get } var city: String { get } var subAdministrativeArea: String { get } var state: String { get } var postalCode: String { get } var country: String { get } var isoCountryCode: String { get } open class func localizedString(forKey key: String) -> String } ᶆ໊دࣦͤഊ දه༳Ε ᶃ౎ಓ෎ݝ ᶄࢢ ᶅࢢҎԼͷॅॴ $/1PTUBM"EESFTTʹ͸ଞʹ΋ଐੑ͋Γ ௨Γʹॅॴؚ͕·Ε͍ͯΔ
  11. TUSFFUͱTVC-PDBMJUZʹॏෳ͋Γ w TVC-PDBMJUZͰࣔ͞Εͨொ໊͕ɺ TUSFFUʹؚ·ΕΔ৔߹͋Γ w TVC-PDBMJUZʓʓொ w TUSFFUʓʓொஸ໨ w ࡳຈͳͲޟ൫্ͷ஍۠Ͱ͸TVC-PDBMJUZ

    ͱTUSFFU͕៉ྷʹ෼͔Ε͍ͯΔ w TVC-PDBMJUZͱTUSFFUͷ಺༰Λௐ੔͢ Δίʔυ͕ඞཁ $/1PTUBM"EESFTTͷTUSFFUଐੑ