CLPlacemark - State Abbreviations?

后端 未结 7 1465
隐瞒了意图╮
隐瞒了意图╮ 2021-02-19 00:24

I was wondering if it was possible to get the state abbreviations from CLPlacemark?

In the CLPlacemark Reference from Apple it states:

administrativeArea The sta

7条回答
  •  走了就别回头了
    2021-02-19 00:45

    SWIFT variant of dictionary

    let states = [
        "AL":"alabama",
        "AK":"alaska",
        "AZ":"arizona",
        "AR":"arkansas",
        "CA":"california",
        "CO":"colorado",
        "CT":"connecticut",
        "DE":"delaware",
        "DC":"district of columbia",
        "FL":"florida",
        "GA":"georgia",
        "HI":"hawaii",
        "ID":"idaho",
        "IL":"illinois",
        "IN":"indiana",
        "IA":"iowa",
        "KS":"kansas",
        "KY":"kentucky",
        "LA":"louisiana",
        "ME":"maine",
        "MD":"maryland",
        "MA":"massachusetts",
        "MI":"michigan",
        "MN":"minnesota",
        "MS":"mississippi",
        "MO":"missouri",
        "MT":"montana",
        "NE":"nebraska",
        "NV":"nevada",
        "NH":"new hampshire",
        "NJ":"new jersey",
        "NM":"new mexico",
        "NY":"new york",
        "NC":"north carolina",
        "ND":"north dakota",
        "OH":"ohio",
        "OK":"oklahoma",
        "OR":"oregon",
        "PA":"pennsylvania",
        "RI":"rhode island",
        "SC":"south carolina",
        "SD":"south dakota",
        "TN":"tennessee",
        "TX":"texas",
        "UT":"utah",
        "VT":"vermont",
        "VA":"virginia",
        "WA":"washington",
        "WV":"west virginia",
        "WI":"wisconsin",
        "WY":"wyoming"
    ]
    

提交回复
热议问题