├── .gitignore ├── LICENSE ├── README.md ├── systemmap(Swift) ├── systemmap(Swift).xcodeproj │ ├── project.pbxproj │ └── project.xcworkspace │ │ └── contents.xcworkspacedata ├── systemmap(Swift) │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ └── Contents.json │ │ ├── Contents.json │ │ ├── map.imageset │ │ │ ├── Contents.json │ │ │ ├── map@2x.png │ │ │ └── map@3x.png │ │ └── map1.imageset │ │ │ ├── Contents.json │ │ │ ├── map1@2x.png │ │ │ └── map1@3x.png │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ ├── ViewController.swift │ └── myAnnotation.swift ├── systemmap(Swift)Tests │ ├── Info.plist │ └── systemmap_Swift_Tests.swift └── systemmap(Swift)UITests │ ├── Info.plist │ └── systemmap_Swift_UITests.swift └── systemmap ├── systemmap.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── anan.xcuserdatad │ │ └── UserInterfaceState.xcuserstate └── xcuserdata │ └── anan.xcuserdatad │ └── xcschemes │ ├── systemmap.xcscheme │ └── xcschememanagement.plist ├── systemmap ├── AppDelegate.h ├── AppDelegate.m ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ └── Contents.json │ ├── Contents.json │ ├── icon_direction.imageset │ │ ├── Contents.json │ │ └── icon_direction.png │ ├── icon_end.imageset │ │ ├── Contents.json │ │ └── icon_end.png │ ├── icon_start.imageset │ │ ├── Contents.json │ │ └── icon_start.png │ ├── map.imageset │ │ ├── Contents.json │ │ ├── map@2x.png │ │ └── map@3x.png │ └── map1.imageset │ │ ├── Contents.json │ │ ├── map1@2x.png │ │ └── map1@3x.png ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard ├── Header.h ├── Info.plist ├── LocationConverter.h ├── LocationConverter.m ├── ViewController.h ├── ViewController.m ├── main.m ├── myAnnotation.h └── myAnnotation.m ├── systemmapTests ├── Info.plist └── systemmapTests.m └── systemmapUITests ├── Info.plist └── systemmapUITests.m /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | # 3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore 4 | 5 | ## Build generated 6 | build/ 7 | DerivedData/ 8 | 9 | ## Various settings 10 | *.pbxuser 11 | !default.pbxuser 12 | *.mode1v3 13 | !default.mode1v3 14 | *.mode2v3 15 | !default.mode2v3 16 | *.perspectivev3 17 | !default.perspectivev3 18 | xcuserdata/ 19 | 20 | ## Other 21 | *.moved-aside 22 | *.xccheckout 23 | *.xcscmblueprint 24 | 25 | ## Obj-C/Swift specific 26 | *.hmap 27 | *.ipa 28 | *.dSYM.zip 29 | *.dSYM 30 | 31 | # CocoaPods 32 | # 33 | # We recommend against adding the Pods directory to your .gitignore. However 34 | # you should judge for yourself, the pros and cons are mentioned at: 35 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control 36 | # 37 | # Pods/ 38 | 39 | # Carthage 40 | # 41 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 42 | # Carthage/Checkouts 43 | 44 | Carthage/Build 45 | 46 | # fastlane 47 | # 48 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the 49 | # screenshots whenever they are needed. 50 | # For more information about the recommended setup visit: 51 | # https://docs.fastlane.tools/best-practices/source-control/#source-control 52 | 53 | fastlane/report.xml 54 | fastlane/Preview.html 55 | fastlane/screenshots 56 | fastlane/test_output 57 | 58 | # Code Injection 59 | # 60 | # After new code Injection tools there's a generated folder /iOSInjectionProject 61 | # https://github.com/johnno1962/injectionforxcode 62 | 63 | iOSInjectionProject/ 64 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # iOS-map1 2 | iOS系统高德地图的一般使用 3 | 4 | 5 | 6 | #点击右上角的 star、watch 按钮,可以收藏本仓库,看到本仓库的更新! 7 | 8 | 1.地图(MKMapView)的使用 9 | 10 | 2.定位(CLLocationManager)的使用 11 | 12 | 3.自定义大头针 13 | 14 | 4.路线规划,画线 15 | 16 | 5.跳转第三方地图导航 17 | 18 | 6.地理编码和反地理编码(CLGeocoder)的使用 19 | 20 | 在开发过程中,如有问题请与我联系。 21 | 22 | 邮箱:peiliancoding@gmail.com 23 | 24 | QQ :2877025939 25 | -------------------------------------------------------------------------------- /systemmap(Swift)/systemmap(Swift).xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 27E664B21F304F75000EFCAF /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27E664B11F304F75000EFCAF /* AppDelegate.swift */; }; 11 | 27E664B41F304F75000EFCAF /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27E664B31F304F75000EFCAF /* ViewController.swift */; }; 12 | 27E664B71F304F75000EFCAF /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 27E664B51F304F75000EFCAF /* Main.storyboard */; }; 13 | 27E664B91F304F75000EFCAF /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 27E664B81F304F75000EFCAF /* Assets.xcassets */; }; 14 | 27E664BC1F304F75000EFCAF /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 27E664BA1F304F75000EFCAF /* LaunchScreen.storyboard */; }; 15 | 27E664C71F304F75000EFCAF /* systemmap_Swift_Tests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27E664C61F304F75000EFCAF /* systemmap_Swift_Tests.swift */; }; 16 | 27E664D21F304F75000EFCAF /* systemmap_Swift_UITests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27E664D11F304F75000EFCAF /* systemmap_Swift_UITests.swift */; }; 17 | 27E664E01F306271000EFCAF /* myAnnotation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27E664DF1F306271000EFCAF /* myAnnotation.swift */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXContainerItemProxy section */ 21 | 27E664C31F304F75000EFCAF /* PBXContainerItemProxy */ = { 22 | isa = PBXContainerItemProxy; 23 | containerPortal = 27E664A61F304F75000EFCAF /* Project object */; 24 | proxyType = 1; 25 | remoteGlobalIDString = 27E664AD1F304F75000EFCAF; 26 | remoteInfo = "systemmap(Swift)"; 27 | }; 28 | 27E664CE1F304F75000EFCAF /* PBXContainerItemProxy */ = { 29 | isa = PBXContainerItemProxy; 30 | containerPortal = 27E664A61F304F75000EFCAF /* Project object */; 31 | proxyType = 1; 32 | remoteGlobalIDString = 27E664AD1F304F75000EFCAF; 33 | remoteInfo = "systemmap(Swift)"; 34 | }; 35 | /* End PBXContainerItemProxy section */ 36 | 37 | /* Begin PBXFileReference section */ 38 | 27E664AE1F304F75000EFCAF /* systemmap(Swift).app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "systemmap(Swift).app"; sourceTree = BUILT_PRODUCTS_DIR; }; 39 | 27E664B11F304F75000EFCAF /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 40 | 27E664B31F304F75000EFCAF /* ViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ViewController.swift; sourceTree = ""; }; 41 | 27E664B61F304F75000EFCAF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 42 | 27E664B81F304F75000EFCAF /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 43 | 27E664BB1F304F75000EFCAF /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 44 | 27E664BD1F304F75000EFCAF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | 27E664C21F304F75000EFCAF /* systemmap(Swift)Tests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "systemmap(Swift)Tests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | 27E664C61F304F75000EFCAF /* systemmap_Swift_Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = systemmap_Swift_Tests.swift; sourceTree = ""; }; 47 | 27E664C81F304F75000EFCAF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 48 | 27E664CD1F304F75000EFCAF /* systemmap(Swift)UITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = "systemmap(Swift)UITests.xctest"; sourceTree = BUILT_PRODUCTS_DIR; }; 49 | 27E664D11F304F75000EFCAF /* systemmap_Swift_UITests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = systemmap_Swift_UITests.swift; sourceTree = ""; }; 50 | 27E664D31F304F75000EFCAF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 51 | 27E664DF1F306271000EFCAF /* myAnnotation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = myAnnotation.swift; sourceTree = ""; }; 52 | /* End PBXFileReference section */ 53 | 54 | /* Begin PBXFrameworksBuildPhase section */ 55 | 27E664AB1F304F75000EFCAF /* Frameworks */ = { 56 | isa = PBXFrameworksBuildPhase; 57 | buildActionMask = 2147483647; 58 | files = ( 59 | ); 60 | runOnlyForDeploymentPostprocessing = 0; 61 | }; 62 | 27E664BF1F304F75000EFCAF /* Frameworks */ = { 63 | isa = PBXFrameworksBuildPhase; 64 | buildActionMask = 2147483647; 65 | files = ( 66 | ); 67 | runOnlyForDeploymentPostprocessing = 0; 68 | }; 69 | 27E664CA1F304F75000EFCAF /* Frameworks */ = { 70 | isa = PBXFrameworksBuildPhase; 71 | buildActionMask = 2147483647; 72 | files = ( 73 | ); 74 | runOnlyForDeploymentPostprocessing = 0; 75 | }; 76 | /* End PBXFrameworksBuildPhase section */ 77 | 78 | /* Begin PBXGroup section */ 79 | 27E664A51F304F75000EFCAF = { 80 | isa = PBXGroup; 81 | children = ( 82 | 27E664B01F304F75000EFCAF /* systemmap(Swift) */, 83 | 27E664C51F304F75000EFCAF /* systemmap(Swift)Tests */, 84 | 27E664D01F304F75000EFCAF /* systemmap(Swift)UITests */, 85 | 27E664AF1F304F75000EFCAF /* Products */, 86 | ); 87 | sourceTree = ""; 88 | }; 89 | 27E664AF1F304F75000EFCAF /* Products */ = { 90 | isa = PBXGroup; 91 | children = ( 92 | 27E664AE1F304F75000EFCAF /* systemmap(Swift).app */, 93 | 27E664C21F304F75000EFCAF /* systemmap(Swift)Tests.xctest */, 94 | 27E664CD1F304F75000EFCAF /* systemmap(Swift)UITests.xctest */, 95 | ); 96 | name = Products; 97 | sourceTree = ""; 98 | }; 99 | 27E664B01F304F75000EFCAF /* systemmap(Swift) */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | 27E664B11F304F75000EFCAF /* AppDelegate.swift */, 103 | 27E664B31F304F75000EFCAF /* ViewController.swift */, 104 | 27E664DF1F306271000EFCAF /* myAnnotation.swift */, 105 | 27E664B51F304F75000EFCAF /* Main.storyboard */, 106 | 27E664B81F304F75000EFCAF /* Assets.xcassets */, 107 | 27E664BA1F304F75000EFCAF /* LaunchScreen.storyboard */, 108 | 27E664BD1F304F75000EFCAF /* Info.plist */, 109 | ); 110 | path = "systemmap(Swift)"; 111 | sourceTree = ""; 112 | }; 113 | 27E664C51F304F75000EFCAF /* systemmap(Swift)Tests */ = { 114 | isa = PBXGroup; 115 | children = ( 116 | 27E664C61F304F75000EFCAF /* systemmap_Swift_Tests.swift */, 117 | 27E664C81F304F75000EFCAF /* Info.plist */, 118 | ); 119 | path = "systemmap(Swift)Tests"; 120 | sourceTree = ""; 121 | }; 122 | 27E664D01F304F75000EFCAF /* systemmap(Swift)UITests */ = { 123 | isa = PBXGroup; 124 | children = ( 125 | 27E664D11F304F75000EFCAF /* systemmap_Swift_UITests.swift */, 126 | 27E664D31F304F75000EFCAF /* Info.plist */, 127 | ); 128 | path = "systemmap(Swift)UITests"; 129 | sourceTree = ""; 130 | }; 131 | /* End PBXGroup section */ 132 | 133 | /* Begin PBXNativeTarget section */ 134 | 27E664AD1F304F75000EFCAF /* systemmap(Swift) */ = { 135 | isa = PBXNativeTarget; 136 | buildConfigurationList = 27E664D61F304F75000EFCAF /* Build configuration list for PBXNativeTarget "systemmap(Swift)" */; 137 | buildPhases = ( 138 | 27E664AA1F304F75000EFCAF /* Sources */, 139 | 27E664AB1F304F75000EFCAF /* Frameworks */, 140 | 27E664AC1F304F75000EFCAF /* Resources */, 141 | ); 142 | buildRules = ( 143 | ); 144 | dependencies = ( 145 | ); 146 | name = "systemmap(Swift)"; 147 | productName = "systemmap(Swift)"; 148 | productReference = 27E664AE1F304F75000EFCAF /* systemmap(Swift).app */; 149 | productType = "com.apple.product-type.application"; 150 | }; 151 | 27E664C11F304F75000EFCAF /* systemmap(Swift)Tests */ = { 152 | isa = PBXNativeTarget; 153 | buildConfigurationList = 27E664D91F304F75000EFCAF /* Build configuration list for PBXNativeTarget "systemmap(Swift)Tests" */; 154 | buildPhases = ( 155 | 27E664BE1F304F75000EFCAF /* Sources */, 156 | 27E664BF1F304F75000EFCAF /* Frameworks */, 157 | 27E664C01F304F75000EFCAF /* Resources */, 158 | ); 159 | buildRules = ( 160 | ); 161 | dependencies = ( 162 | 27E664C41F304F75000EFCAF /* PBXTargetDependency */, 163 | ); 164 | name = "systemmap(Swift)Tests"; 165 | productName = "systemmap(Swift)Tests"; 166 | productReference = 27E664C21F304F75000EFCAF /* systemmap(Swift)Tests.xctest */; 167 | productType = "com.apple.product-type.bundle.unit-test"; 168 | }; 169 | 27E664CC1F304F75000EFCAF /* systemmap(Swift)UITests */ = { 170 | isa = PBXNativeTarget; 171 | buildConfigurationList = 27E664DC1F304F75000EFCAF /* Build configuration list for PBXNativeTarget "systemmap(Swift)UITests" */; 172 | buildPhases = ( 173 | 27E664C91F304F75000EFCAF /* Sources */, 174 | 27E664CA1F304F75000EFCAF /* Frameworks */, 175 | 27E664CB1F304F75000EFCAF /* Resources */, 176 | ); 177 | buildRules = ( 178 | ); 179 | dependencies = ( 180 | 27E664CF1F304F75000EFCAF /* PBXTargetDependency */, 181 | ); 182 | name = "systemmap(Swift)UITests"; 183 | productName = "systemmap(Swift)UITests"; 184 | productReference = 27E664CD1F304F75000EFCAF /* systemmap(Swift)UITests.xctest */; 185 | productType = "com.apple.product-type.bundle.ui-testing"; 186 | }; 187 | /* End PBXNativeTarget section */ 188 | 189 | /* Begin PBXProject section */ 190 | 27E664A61F304F75000EFCAF /* Project object */ = { 191 | isa = PBXProject; 192 | attributes = { 193 | LastSwiftUpdateCheck = 0830; 194 | LastUpgradeCheck = 0830; 195 | ORGANIZATIONNAME = Plan; 196 | TargetAttributes = { 197 | 27E664AD1F304F75000EFCAF = { 198 | CreatedOnToolsVersion = 8.3.1; 199 | DevelopmentTeam = HWQF636ATC; 200 | ProvisioningStyle = Automatic; 201 | }; 202 | 27E664C11F304F75000EFCAF = { 203 | CreatedOnToolsVersion = 8.3.1; 204 | DevelopmentTeam = HWQF636ATC; 205 | ProvisioningStyle = Automatic; 206 | TestTargetID = 27E664AD1F304F75000EFCAF; 207 | }; 208 | 27E664CC1F304F75000EFCAF = { 209 | CreatedOnToolsVersion = 8.3.1; 210 | DevelopmentTeam = HWQF636ATC; 211 | ProvisioningStyle = Automatic; 212 | TestTargetID = 27E664AD1F304F75000EFCAF; 213 | }; 214 | }; 215 | }; 216 | buildConfigurationList = 27E664A91F304F75000EFCAF /* Build configuration list for PBXProject "systemmap(Swift)" */; 217 | compatibilityVersion = "Xcode 3.2"; 218 | developmentRegion = English; 219 | hasScannedForEncodings = 0; 220 | knownRegions = ( 221 | en, 222 | Base, 223 | ); 224 | mainGroup = 27E664A51F304F75000EFCAF; 225 | productRefGroup = 27E664AF1F304F75000EFCAF /* Products */; 226 | projectDirPath = ""; 227 | projectRoot = ""; 228 | targets = ( 229 | 27E664AD1F304F75000EFCAF /* systemmap(Swift) */, 230 | 27E664C11F304F75000EFCAF /* systemmap(Swift)Tests */, 231 | 27E664CC1F304F75000EFCAF /* systemmap(Swift)UITests */, 232 | ); 233 | }; 234 | /* End PBXProject section */ 235 | 236 | /* Begin PBXResourcesBuildPhase section */ 237 | 27E664AC1F304F75000EFCAF /* Resources */ = { 238 | isa = PBXResourcesBuildPhase; 239 | buildActionMask = 2147483647; 240 | files = ( 241 | 27E664BC1F304F75000EFCAF /* LaunchScreen.storyboard in Resources */, 242 | 27E664B91F304F75000EFCAF /* Assets.xcassets in Resources */, 243 | 27E664B71F304F75000EFCAF /* Main.storyboard in Resources */, 244 | ); 245 | runOnlyForDeploymentPostprocessing = 0; 246 | }; 247 | 27E664C01F304F75000EFCAF /* Resources */ = { 248 | isa = PBXResourcesBuildPhase; 249 | buildActionMask = 2147483647; 250 | files = ( 251 | ); 252 | runOnlyForDeploymentPostprocessing = 0; 253 | }; 254 | 27E664CB1F304F75000EFCAF /* Resources */ = { 255 | isa = PBXResourcesBuildPhase; 256 | buildActionMask = 2147483647; 257 | files = ( 258 | ); 259 | runOnlyForDeploymentPostprocessing = 0; 260 | }; 261 | /* End PBXResourcesBuildPhase section */ 262 | 263 | /* Begin PBXSourcesBuildPhase section */ 264 | 27E664AA1F304F75000EFCAF /* Sources */ = { 265 | isa = PBXSourcesBuildPhase; 266 | buildActionMask = 2147483647; 267 | files = ( 268 | 27E664B41F304F75000EFCAF /* ViewController.swift in Sources */, 269 | 27E664B21F304F75000EFCAF /* AppDelegate.swift in Sources */, 270 | 27E664E01F306271000EFCAF /* myAnnotation.swift in Sources */, 271 | ); 272 | runOnlyForDeploymentPostprocessing = 0; 273 | }; 274 | 27E664BE1F304F75000EFCAF /* Sources */ = { 275 | isa = PBXSourcesBuildPhase; 276 | buildActionMask = 2147483647; 277 | files = ( 278 | 27E664C71F304F75000EFCAF /* systemmap_Swift_Tests.swift in Sources */, 279 | ); 280 | runOnlyForDeploymentPostprocessing = 0; 281 | }; 282 | 27E664C91F304F75000EFCAF /* Sources */ = { 283 | isa = PBXSourcesBuildPhase; 284 | buildActionMask = 2147483647; 285 | files = ( 286 | 27E664D21F304F75000EFCAF /* systemmap_Swift_UITests.swift in Sources */, 287 | ); 288 | runOnlyForDeploymentPostprocessing = 0; 289 | }; 290 | /* End PBXSourcesBuildPhase section */ 291 | 292 | /* Begin PBXTargetDependency section */ 293 | 27E664C41F304F75000EFCAF /* PBXTargetDependency */ = { 294 | isa = PBXTargetDependency; 295 | target = 27E664AD1F304F75000EFCAF /* systemmap(Swift) */; 296 | targetProxy = 27E664C31F304F75000EFCAF /* PBXContainerItemProxy */; 297 | }; 298 | 27E664CF1F304F75000EFCAF /* PBXTargetDependency */ = { 299 | isa = PBXTargetDependency; 300 | target = 27E664AD1F304F75000EFCAF /* systemmap(Swift) */; 301 | targetProxy = 27E664CE1F304F75000EFCAF /* PBXContainerItemProxy */; 302 | }; 303 | /* End PBXTargetDependency section */ 304 | 305 | /* Begin PBXVariantGroup section */ 306 | 27E664B51F304F75000EFCAF /* Main.storyboard */ = { 307 | isa = PBXVariantGroup; 308 | children = ( 309 | 27E664B61F304F75000EFCAF /* Base */, 310 | ); 311 | name = Main.storyboard; 312 | sourceTree = ""; 313 | }; 314 | 27E664BA1F304F75000EFCAF /* LaunchScreen.storyboard */ = { 315 | isa = PBXVariantGroup; 316 | children = ( 317 | 27E664BB1F304F75000EFCAF /* Base */, 318 | ); 319 | name = LaunchScreen.storyboard; 320 | sourceTree = ""; 321 | }; 322 | /* End PBXVariantGroup section */ 323 | 324 | /* Begin XCBuildConfiguration section */ 325 | 27E664D41F304F75000EFCAF /* Debug */ = { 326 | isa = XCBuildConfiguration; 327 | buildSettings = { 328 | ALWAYS_SEARCH_USER_PATHS = NO; 329 | CLANG_ANALYZER_NONNULL = YES; 330 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 331 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 332 | CLANG_CXX_LIBRARY = "libc++"; 333 | CLANG_ENABLE_MODULES = YES; 334 | CLANG_ENABLE_OBJC_ARC = YES; 335 | CLANG_WARN_BOOL_CONVERSION = YES; 336 | CLANG_WARN_CONSTANT_CONVERSION = YES; 337 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 338 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 339 | CLANG_WARN_EMPTY_BODY = YES; 340 | CLANG_WARN_ENUM_CONVERSION = YES; 341 | CLANG_WARN_INFINITE_RECURSION = YES; 342 | CLANG_WARN_INT_CONVERSION = YES; 343 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 344 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 345 | CLANG_WARN_UNREACHABLE_CODE = YES; 346 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 347 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 348 | COPY_PHASE_STRIP = NO; 349 | DEBUG_INFORMATION_FORMAT = dwarf; 350 | ENABLE_STRICT_OBJC_MSGSEND = YES; 351 | ENABLE_TESTABILITY = YES; 352 | GCC_C_LANGUAGE_STANDARD = gnu99; 353 | GCC_DYNAMIC_NO_PIC = NO; 354 | GCC_NO_COMMON_BLOCKS = YES; 355 | GCC_OPTIMIZATION_LEVEL = 0; 356 | GCC_PREPROCESSOR_DEFINITIONS = ( 357 | "DEBUG=1", 358 | "$(inherited)", 359 | ); 360 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 361 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 362 | GCC_WARN_UNDECLARED_SELECTOR = YES; 363 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 364 | GCC_WARN_UNUSED_FUNCTION = YES; 365 | GCC_WARN_UNUSED_VARIABLE = YES; 366 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 367 | MTL_ENABLE_DEBUG_INFO = YES; 368 | ONLY_ACTIVE_ARCH = YES; 369 | SDKROOT = iphoneos; 370 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; 371 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 372 | TARGETED_DEVICE_FAMILY = "1,2"; 373 | }; 374 | name = Debug; 375 | }; 376 | 27E664D51F304F75000EFCAF /* Release */ = { 377 | isa = XCBuildConfiguration; 378 | buildSettings = { 379 | ALWAYS_SEARCH_USER_PATHS = NO; 380 | CLANG_ANALYZER_NONNULL = YES; 381 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 382 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 383 | CLANG_CXX_LIBRARY = "libc++"; 384 | CLANG_ENABLE_MODULES = YES; 385 | CLANG_ENABLE_OBJC_ARC = YES; 386 | CLANG_WARN_BOOL_CONVERSION = YES; 387 | CLANG_WARN_CONSTANT_CONVERSION = YES; 388 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 389 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 390 | CLANG_WARN_EMPTY_BODY = YES; 391 | CLANG_WARN_ENUM_CONVERSION = YES; 392 | CLANG_WARN_INFINITE_RECURSION = YES; 393 | CLANG_WARN_INT_CONVERSION = YES; 394 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 395 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 396 | CLANG_WARN_UNREACHABLE_CODE = YES; 397 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 398 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 399 | COPY_PHASE_STRIP = NO; 400 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 401 | ENABLE_NS_ASSERTIONS = NO; 402 | ENABLE_STRICT_OBJC_MSGSEND = YES; 403 | GCC_C_LANGUAGE_STANDARD = gnu99; 404 | GCC_NO_COMMON_BLOCKS = YES; 405 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 406 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 407 | GCC_WARN_UNDECLARED_SELECTOR = YES; 408 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 409 | GCC_WARN_UNUSED_FUNCTION = YES; 410 | GCC_WARN_UNUSED_VARIABLE = YES; 411 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 412 | MTL_ENABLE_DEBUG_INFO = NO; 413 | SDKROOT = iphoneos; 414 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 415 | TARGETED_DEVICE_FAMILY = "1,2"; 416 | VALIDATE_PRODUCT = YES; 417 | }; 418 | name = Release; 419 | }; 420 | 27E664D71F304F75000EFCAF /* Debug */ = { 421 | isa = XCBuildConfiguration; 422 | buildSettings = { 423 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 424 | DEVELOPMENT_TEAM = HWQF636ATC; 425 | INFOPLIST_FILE = "systemmap(Swift)/Info.plist"; 426 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 427 | PRODUCT_BUNDLE_IDENTIFIER = "com.Plan.systemmap-Swift-"; 428 | PRODUCT_NAME = "$(TARGET_NAME)"; 429 | SWIFT_VERSION = 3.0; 430 | }; 431 | name = Debug; 432 | }; 433 | 27E664D81F304F75000EFCAF /* Release */ = { 434 | isa = XCBuildConfiguration; 435 | buildSettings = { 436 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 437 | DEVELOPMENT_TEAM = HWQF636ATC; 438 | INFOPLIST_FILE = "systemmap(Swift)/Info.plist"; 439 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 440 | PRODUCT_BUNDLE_IDENTIFIER = "com.Plan.systemmap-Swift-"; 441 | PRODUCT_NAME = "$(TARGET_NAME)"; 442 | SWIFT_VERSION = 3.0; 443 | }; 444 | name = Release; 445 | }; 446 | 27E664DA1F304F75000EFCAF /* Debug */ = { 447 | isa = XCBuildConfiguration; 448 | buildSettings = { 449 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 450 | BUNDLE_LOADER = "$(TEST_HOST)"; 451 | DEVELOPMENT_TEAM = HWQF636ATC; 452 | INFOPLIST_FILE = "systemmap(Swift)Tests/Info.plist"; 453 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 454 | PRODUCT_BUNDLE_IDENTIFIER = "com.Plan.systemmap-Swift-Tests"; 455 | PRODUCT_NAME = "$(TARGET_NAME)"; 456 | SWIFT_VERSION = 3.0; 457 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/systemmap(Swift).app/systemmap(Swift)"; 458 | }; 459 | name = Debug; 460 | }; 461 | 27E664DB1F304F75000EFCAF /* Release */ = { 462 | isa = XCBuildConfiguration; 463 | buildSettings = { 464 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 465 | BUNDLE_LOADER = "$(TEST_HOST)"; 466 | DEVELOPMENT_TEAM = HWQF636ATC; 467 | INFOPLIST_FILE = "systemmap(Swift)Tests/Info.plist"; 468 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 469 | PRODUCT_BUNDLE_IDENTIFIER = "com.Plan.systemmap-Swift-Tests"; 470 | PRODUCT_NAME = "$(TARGET_NAME)"; 471 | SWIFT_VERSION = 3.0; 472 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/systemmap(Swift).app/systemmap(Swift)"; 473 | }; 474 | name = Release; 475 | }; 476 | 27E664DD1F304F75000EFCAF /* Debug */ = { 477 | isa = XCBuildConfiguration; 478 | buildSettings = { 479 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 480 | DEVELOPMENT_TEAM = HWQF636ATC; 481 | INFOPLIST_FILE = "systemmap(Swift)UITests/Info.plist"; 482 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 483 | PRODUCT_BUNDLE_IDENTIFIER = "com.Plan.systemmap-Swift-UITests"; 484 | PRODUCT_NAME = "$(TARGET_NAME)"; 485 | SWIFT_VERSION = 3.0; 486 | TEST_TARGET_NAME = "systemmap(Swift)"; 487 | }; 488 | name = Debug; 489 | }; 490 | 27E664DE1F304F75000EFCAF /* Release */ = { 491 | isa = XCBuildConfiguration; 492 | buildSettings = { 493 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES; 494 | DEVELOPMENT_TEAM = HWQF636ATC; 495 | INFOPLIST_FILE = "systemmap(Swift)UITests/Info.plist"; 496 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 497 | PRODUCT_BUNDLE_IDENTIFIER = "com.Plan.systemmap-Swift-UITests"; 498 | PRODUCT_NAME = "$(TARGET_NAME)"; 499 | SWIFT_VERSION = 3.0; 500 | TEST_TARGET_NAME = "systemmap(Swift)"; 501 | }; 502 | name = Release; 503 | }; 504 | /* End XCBuildConfiguration section */ 505 | 506 | /* Begin XCConfigurationList section */ 507 | 27E664A91F304F75000EFCAF /* Build configuration list for PBXProject "systemmap(Swift)" */ = { 508 | isa = XCConfigurationList; 509 | buildConfigurations = ( 510 | 27E664D41F304F75000EFCAF /* Debug */, 511 | 27E664D51F304F75000EFCAF /* Release */, 512 | ); 513 | defaultConfigurationIsVisible = 0; 514 | defaultConfigurationName = Release; 515 | }; 516 | 27E664D61F304F75000EFCAF /* Build configuration list for PBXNativeTarget "systemmap(Swift)" */ = { 517 | isa = XCConfigurationList; 518 | buildConfigurations = ( 519 | 27E664D71F304F75000EFCAF /* Debug */, 520 | 27E664D81F304F75000EFCAF /* Release */, 521 | ); 522 | defaultConfigurationIsVisible = 0; 523 | }; 524 | 27E664D91F304F75000EFCAF /* Build configuration list for PBXNativeTarget "systemmap(Swift)Tests" */ = { 525 | isa = XCConfigurationList; 526 | buildConfigurations = ( 527 | 27E664DA1F304F75000EFCAF /* Debug */, 528 | 27E664DB1F304F75000EFCAF /* Release */, 529 | ); 530 | defaultConfigurationIsVisible = 0; 531 | }; 532 | 27E664DC1F304F75000EFCAF /* Build configuration list for PBXNativeTarget "systemmap(Swift)UITests" */ = { 533 | isa = XCConfigurationList; 534 | buildConfigurations = ( 535 | 27E664DD1F304F75000EFCAF /* Debug */, 536 | 27E664DE1F304F75000EFCAF /* Release */, 537 | ); 538 | defaultConfigurationIsVisible = 0; 539 | }; 540 | /* End XCConfigurationList section */ 541 | }; 542 | rootObject = 27E664A61F304F75000EFCAF /* Project object */; 543 | } 544 | -------------------------------------------------------------------------------- /systemmap(Swift)/systemmap(Swift).xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /systemmap(Swift)/systemmap(Swift)/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // systemmap(Swift) 4 | // 5 | // Created by anan on 2017/8/1. 6 | // Copyright © 2017年 Plan. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | 19 | window = UIWindow(frame: UIScreen.main.bounds) 20 | window?.makeKeyAndVisible() 21 | window?.rootViewController = ViewControlvar() 22 | 23 | // Override point for customization after application launch. 24 | return true 25 | } 26 | 27 | func applicationWillResignActive(_ application: UIApplication) { 28 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 29 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 30 | } 31 | 32 | func applicationDidEnterBackground(_ application: UIApplication) { 33 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 34 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 35 | } 36 | 37 | func applicationWillEnterForeground(_ application: UIApplication) { 38 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 39 | } 40 | 41 | func applicationDidBecomeActive(_ application: UIApplication) { 42 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 43 | } 44 | 45 | func applicationWillTerminate(_ application: UIApplication) { 46 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 47 | } 48 | 49 | 50 | } 51 | 52 | -------------------------------------------------------------------------------- /systemmap(Swift)/systemmap(Swift)/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | } 88 | ], 89 | "info" : { 90 | "version" : 1, 91 | "author" : "xcode" 92 | } 93 | } -------------------------------------------------------------------------------- /systemmap(Swift)/systemmap(Swift)/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /systemmap(Swift)/systemmap(Swift)/Assets.xcassets/map.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "map@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "map@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /systemmap(Swift)/systemmap(Swift)/Assets.xcassets/map.imageset/map@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2877025939/iOS-map/5726ded7cb83f7f067ea38ef8254e69c4819a2ee/systemmap(Swift)/systemmap(Swift)/Assets.xcassets/map.imageset/map@2x.png -------------------------------------------------------------------------------- /systemmap(Swift)/systemmap(Swift)/Assets.xcassets/map.imageset/map@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2877025939/iOS-map/5726ded7cb83f7f067ea38ef8254e69c4819a2ee/systemmap(Swift)/systemmap(Swift)/Assets.xcassets/map.imageset/map@3x.png -------------------------------------------------------------------------------- /systemmap(Swift)/systemmap(Swift)/Assets.xcassets/map1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "map1@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "map1@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /systemmap(Swift)/systemmap(Swift)/Assets.xcassets/map1.imageset/map1@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2877025939/iOS-map/5726ded7cb83f7f067ea38ef8254e69c4819a2ee/systemmap(Swift)/systemmap(Swift)/Assets.xcassets/map1.imageset/map1@2x.png -------------------------------------------------------------------------------- /systemmap(Swift)/systemmap(Swift)/Assets.xcassets/map1.imageset/map1@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2877025939/iOS-map/5726ded7cb83f7f067ea38ef8254e69c4819a2ee/systemmap(Swift)/systemmap(Swift)/Assets.xcassets/map1.imageset/map1@3x.png -------------------------------------------------------------------------------- /systemmap(Swift)/systemmap(Swift)/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /systemmap(Swift)/systemmap(Swift)/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /systemmap(Swift)/systemmap(Swift)/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | NSLocationWhenInUseUsageDescription 6 | 使用期间定位 7 | CFBundleDevelopmentRegion 8 | en 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | $(PRODUCT_NAME) 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UIRequiredDeviceCapabilities 30 | 31 | armv7 32 | 33 | UISupportedInterfaceOrientations 34 | 35 | UIInterfaceOrientationPortrait 36 | UIInterfaceOrientationLandscapeLeft 37 | UIInterfaceOrientationLandscapeRight 38 | 39 | UISupportedInterfaceOrientations~ipad 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationPortraitUpsideDown 43 | UIInterfaceOrientationLandscapeLeft 44 | UIInterfaceOrientationLandscapeRight 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /systemmap(Swift)/systemmap(Swift)/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // systemmap(Swift) 4 | // 5 | // Created by anan on 2017/8/1. 6 | // Copyright © 2017年 Plan. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import CoreLocation 11 | import MapKit 12 | class ViewControlvar: UIViewController,MKMapViewDelegate,CLLocationManagerDelegate,UIActionSheetDelegate 13 | { 14 | 15 | var latitude :Double = 0.0 16 | var longitude :Double = 0.0 17 | var myLatitude :Double = 0.0 18 | var myLongitude :Double = 0.0 19 | 20 | var locationManager :CLLocationManager? 21 | var mapView :MKMapView! 22 | var geoC :CLGeocoder? 23 | var str :String! 24 | var directions :MKDirections? 25 | 26 | 27 | override func viewDidLoad() { 28 | super.viewDidLoad() 29 | 30 | self.navigationItem.rightBarButtonItem = UIBarButtonItem.init(title: "规划", style: .plain, target: self, action:#selector(click)) 31 | 32 | self.navigationItem.leftBarButtonItem = UIBarButtonItem.init(title: "导航", style: .plain, target: self, action:#selector(leftClick)) 33 | 34 | createMap() 35 | 36 | createLocation() 37 | 38 | createGeoC1() 39 | } 40 | 41 | func createMap() -> Void { 42 | 43 | mapView = MKMapView.init(frame: CGRect(x: 0, y: 0, width: self.view.frame.size.width, height: self.view.frame.size.height)) 44 | mapView?.mapType = MKMapType.standard 45 | mapView?.showsScale = true 46 | mapView?.showsCompass = true 47 | mapView?.showsUserLocation = true 48 | mapView?.delegate = self 49 | self.view.addSubview(mapView!) 50 | 51 | } 52 | 53 | func createLocation() -> Void { 54 | 55 | if CLLocationManager.locationServicesEnabled() { 56 | print("可以定位") 57 | 58 | locationManager = CLLocationManager.init() 59 | locationManager?.delegate = self 60 | locationManager?.desiredAccuracy = kCLLocationAccuracyBest 61 | locationManager?.distanceFilter = 50 62 | 63 | if CLLocationManager.authorizationStatus() == .notDetermined { 64 | locationManager?.requestWhenInUseAuthorization() 65 | } 66 | locationManager?.startUpdatingLocation() 67 | }else{ 68 | 69 | print("打开定位权限") 70 | } 71 | } 72 | 73 | 74 | func createGeoC1() -> Void { 75 | geoC = CLGeocoder.init() 76 | 77 | test() 78 | } 79 | 80 | //MARK: - CLLocationManagerDelegate 81 | 82 | //定位成功 83 | func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation]) { 84 | print("定位成功"); 85 | 86 | //定位: 87 | let currLocation = locations.last 88 | 89 | //CLLocation *currLocation =[locations lastObject]; 90 | 91 | 92 | //重置定位 93 | var theCoordinate = CLLocationCoordinate2D() 94 | 95 | //latitude纬度 96 | theCoordinate.latitude = (currLocation?.coordinate.latitude)!; 97 | //longitude经度 98 | theCoordinate.longitude = (currLocation?.coordinate.longitude)!; 99 | 100 | myLatitude = (currLocation?.coordinate.latitude)!; 101 | myLongitude = (currLocation?.coordinate.longitude)!; 102 | 103 | //定义显示的范围span范围 104 | var theSpan = MKCoordinateSpan() 105 | 106 | theSpan.latitudeDelta = 0.01; 107 | theSpan.longitudeDelta = 0.01; 108 | 109 | //定义显示的区域 region区域范围 110 | var theRegion = MKCoordinateRegion() 111 | theRegion.center = theCoordinate 112 | theRegion.span = theSpan 113 | 114 | //设置地图显示 115 | mapView.region = theRegion 116 | //[self.mapView setRegion:theRegion]; 117 | } 118 | 119 | //定位失败 120 | func locationManager(_ manager: CLLocationManager, didFailWithError error: Error) { 121 | print("定位失败!详见:\(error)"); 122 | 123 | } 124 | 125 | //方向更新 126 | func locationManager(_ manager: CLLocationManager, didUpdateHeading newHeading: CLHeading) { 127 | 128 | } 129 | 130 | 131 | func locationManagerShouldDisplayHeadingCalibration(_ manager: CLLocationManager) -> Bool { 132 | 133 | return true 134 | } 135 | 136 | 137 | //MARK: 地图代理方法 138 | func mapView(_ mapView: MKMapView, didUpdate userLocation: MKUserLocation) { 139 | 140 | userLocation.title = "现在位置" 141 | 142 | var theCoordinate = CLLocationCoordinate2D() 143 | 144 | //latitude纬度 145 | theCoordinate.latitude = userLocation.coordinate.latitude; 146 | //longitude经度 147 | theCoordinate.longitude = userLocation.coordinate.longitude; 148 | 149 | mapView.setCenter(theCoordinate, animated: true) 150 | 151 | 152 | } 153 | 154 | func mapView(_ mapView: MKMapView, regionWillChangeAnimated animated: Bool) { 155 | 156 | } 157 | 158 | func mapView(_ mapView: MKMapView, regionDidChangeAnimated animated: Bool) { 159 | 160 | } 161 | 162 | func mapView(_ mapView: MKMapView, viewFor annotation: MKAnnotation) -> MKAnnotationView? { 163 | 164 | // 判断大头针位置是否在原点,如果是则不加大头针 165 | if annotation is MKUserLocation { 166 | 167 | return nil 168 | } 169 | 170 | let inden = "pappap" 171 | var pin = mapView.dequeueReusableAnnotationView(withIdentifier: inden) 172 | 173 | if pin == nil { 174 | pin = MKAnnotationView.init(annotation: annotation, reuseIdentifier: inden) 175 | pin?.annotation = annotation 176 | // pin?.canShowCallout = true 177 | // pin?.isDraggable = true 178 | 179 | } 180 | 181 | pin?.image = UIImage(named: "map") 182 | let imageView = UIImageView.init(frame: CGRect(x: 0, y: 0, width: 20, height: 25)) 183 | imageView.image = UIImage(named: "map1") 184 | //pin?.leftCalloutAccessoryView = imageView; 185 | pin?.detailCalloutAccessoryView = imageView 186 | return pin 187 | 188 | } 189 | 190 | 191 | 192 | func test() -> Void { 193 | 194 | geoC?.geocodeAddressString("张江药谷大厦", completionHandler: { (pls: [CLPlacemark]?, error: Error?) in 195 | 196 | if error == nil { 197 | print("地理编码成功") 198 | guard pls != nil else {return} 199 | 200 | let firstPL = pls?.first 201 | // self.addressTV.text = firstPL?.name 202 | self.latitude = (firstPL?.location?.coordinate.latitude)! 203 | self.longitude = (firstPL?.location?.coordinate.longitude)! 204 | 205 | //计算两个坐标之间的位置 206 | let location1 = CLLocation.init(latitude: self.latitude, longitude: self.longitude) 207 | let location2 = CLLocation.init(latitude: self.myLatitude, longitude: self.myLongitude) 208 | 209 | let distance = location1.distance(from: location2) 210 | 211 | self.str = String(format: "%", arguments: [distance/1000]) 212 | 213 | 214 | 215 | self.addAnnoWithPT(pt: (firstPL?.location?.coordinate)!) 216 | 217 | 218 | 219 | 220 | }else { 221 | print("错误") 222 | } 223 | }) 224 | } 225 | 226 | func addAnnoWithPT(pt:CLLocationCoordinate2D) -> Void { 227 | 228 | 229 | //创建一个大头针对象 230 | let objectAnnotation = MKPointAnnotation() 231 | 232 | //设置大头针的显示位置 233 | objectAnnotation.coordinate = CLLocation(latitude: pt.latitude, 234 | longitude: pt.longitude).coordinate 235 | //设置点击大头针之后显示的标题 236 | objectAnnotation.title = self.str 237 | //设置点击大头针之后显示的描述 238 | objectAnnotation.subtitle = "张江药谷大厦" 239 | 240 | 241 | //添加大头针 242 | self.mapView.addAnnotation(objectAnnotation) 243 | 244 | // let anno = myAnnotation.init() 245 | // 246 | // anno.coordinate = pt 247 | // anno.title = self.str! 248 | // anno.subtitle = "张江药谷大厦" 249 | // 250 | // self.mapView.addAnnotation(anno as! MKAnnotation) 251 | } 252 | 253 | func click() -> Void { 254 | 255 | } 256 | 257 | 258 | func leftClick() -> Void { 259 | 260 | } 261 | override func didReceiveMemoryWarning() { 262 | super.didReceiveMemoryWarning() 263 | // Dispose of any resources that can be recreated. 264 | } 265 | 266 | 267 | } 268 | 269 | -------------------------------------------------------------------------------- /systemmap(Swift)/systemmap(Swift)/myAnnotation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // myAnnotation.swift 3 | // systemmap(Swift) 4 | // 5 | // Created by anan on 2017/8/1. 6 | // Copyright © 2017年 Plan. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import MapKit 11 | class myAnnotation: NSObject{ 12 | 13 | var coordinate = CLLocationCoordinate2D() 14 | var title = NSString() 15 | var subtitle = NSString() 16 | 17 | 18 | 19 | 20 | } 21 | -------------------------------------------------------------------------------- /systemmap(Swift)/systemmap(Swift)Tests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /systemmap(Swift)/systemmap(Swift)Tests/systemmap_Swift_Tests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // systemmap_Swift_Tests.swift 3 | // systemmap(Swift)Tests 4 | // 5 | // Created by anan on 2017/8/1. 6 | // Copyright © 2017年 Plan. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import systemmap_Swift_ 11 | 12 | class systemmap_Swift_Tests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /systemmap(Swift)/systemmap(Swift)UITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /systemmap(Swift)/systemmap(Swift)UITests/systemmap_Swift_UITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // systemmap_Swift_UITests.swift 3 | // systemmap(Swift)UITests 4 | // 5 | // Created by anan on 2017/8/1. 6 | // Copyright © 2017年 Plan. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class systemmap_Swift_UITests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | 18 | // In UI tests it is usually best to stop immediately when a failure occurs. 19 | continueAfterFailure = false 20 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 21 | XCUIApplication().launch() 22 | 23 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 24 | } 25 | 26 | override func tearDown() { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | super.tearDown() 29 | } 30 | 31 | func testExample() { 32 | // Use recording to get started writing UI tests. 33 | // Use XCTAssert and related functions to verify your tests produce the correct results. 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /systemmap/systemmap.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 27FDC7911F0E24C70016D57C /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 27FDC7901F0E24C70016D57C /* main.m */; }; 11 | 27FDC79A1F0E24C70016D57C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 27FDC7981F0E24C70016D57C /* Main.storyboard */; }; 12 | 27FDC79C1F0E24C70016D57C /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 27FDC79B1F0E24C70016D57C /* Assets.xcassets */; }; 13 | 27FDC79F1F0E24C70016D57C /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 27FDC79D1F0E24C70016D57C /* LaunchScreen.storyboard */; }; 14 | 27FDC7AA1F0E24C70016D57C /* systemmapTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 27FDC7A91F0E24C70016D57C /* systemmapTests.m */; }; 15 | 27FDC7B51F0E24C70016D57C /* systemmapUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 27FDC7B41F0E24C70016D57C /* systemmapUITests.m */; }; 16 | 27FDC7C81F0E25350016D57C /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 27FDC7C31F0E25350016D57C /* ViewController.m */; }; 17 | 27FDC7C91F0E25350016D57C /* LocationConverter.m in Sources */ = {isa = PBXBuildFile; fileRef = 27FDC7C51F0E25350016D57C /* LocationConverter.m */; }; 18 | 27FDC7CA1F0E25350016D57C /* myAnnotation.m in Sources */ = {isa = PBXBuildFile; fileRef = 27FDC7C71F0E25350016D57C /* myAnnotation.m */; }; 19 | 27FDC7CD1F0E254B0016D57C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 27FDC7CC1F0E254B0016D57C /* AppDelegate.m */; }; 20 | /* End PBXBuildFile section */ 21 | 22 | /* Begin PBXContainerItemProxy section */ 23 | 27FDC7A61F0E24C70016D57C /* PBXContainerItemProxy */ = { 24 | isa = PBXContainerItemProxy; 25 | containerPortal = 27FDC7841F0E24C70016D57C /* Project object */; 26 | proxyType = 1; 27 | remoteGlobalIDString = 27FDC78B1F0E24C70016D57C; 28 | remoteInfo = systemmap; 29 | }; 30 | 27FDC7B11F0E24C70016D57C /* PBXContainerItemProxy */ = { 31 | isa = PBXContainerItemProxy; 32 | containerPortal = 27FDC7841F0E24C70016D57C /* Project object */; 33 | proxyType = 1; 34 | remoteGlobalIDString = 27FDC78B1F0E24C70016D57C; 35 | remoteInfo = systemmap; 36 | }; 37 | /* End PBXContainerItemProxy section */ 38 | 39 | /* Begin PBXFileReference section */ 40 | 27FDC78C1F0E24C70016D57C /* systemmap.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = systemmap.app; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 27FDC7901F0E24C70016D57C /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 42 | 27FDC7921F0E24C70016D57C /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 43 | 27FDC7991F0E24C70016D57C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 44 | 27FDC79B1F0E24C70016D57C /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 45 | 27FDC79E1F0E24C70016D57C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 46 | 27FDC7A01F0E24C70016D57C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 47 | 27FDC7A51F0E24C70016D57C /* systemmapTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = systemmapTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 48 | 27FDC7A91F0E24C70016D57C /* systemmapTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = systemmapTests.m; sourceTree = ""; }; 49 | 27FDC7AB1F0E24C70016D57C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 50 | 27FDC7B01F0E24C70016D57C /* systemmapUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = systemmapUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 51 | 27FDC7B41F0E24C70016D57C /* systemmapUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = systemmapUITests.m; sourceTree = ""; }; 52 | 27FDC7B61F0E24C70016D57C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 53 | 27FDC7C21F0E25350016D57C /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; }; 54 | 27FDC7C31F0E25350016D57C /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 55 | 27FDC7C41F0E25350016D57C /* LocationConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocationConverter.h; sourceTree = ""; }; 56 | 27FDC7C51F0E25350016D57C /* LocationConverter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LocationConverter.m; sourceTree = ""; }; 57 | 27FDC7C61F0E25350016D57C /* myAnnotation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = myAnnotation.h; sourceTree = ""; }; 58 | 27FDC7C71F0E25350016D57C /* myAnnotation.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = myAnnotation.m; sourceTree = ""; }; 59 | 27FDC7CB1F0E253B0016D57C /* Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Header.h; sourceTree = ""; }; 60 | 27FDC7CC1F0E254B0016D57C /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 61 | /* End PBXFileReference section */ 62 | 63 | /* Begin PBXFrameworksBuildPhase section */ 64 | 27FDC7891F0E24C70016D57C /* Frameworks */ = { 65 | isa = PBXFrameworksBuildPhase; 66 | buildActionMask = 2147483647; 67 | files = ( 68 | ); 69 | runOnlyForDeploymentPostprocessing = 0; 70 | }; 71 | 27FDC7A21F0E24C70016D57C /* Frameworks */ = { 72 | isa = PBXFrameworksBuildPhase; 73 | buildActionMask = 2147483647; 74 | files = ( 75 | ); 76 | runOnlyForDeploymentPostprocessing = 0; 77 | }; 78 | 27FDC7AD1F0E24C70016D57C /* Frameworks */ = { 79 | isa = PBXFrameworksBuildPhase; 80 | buildActionMask = 2147483647; 81 | files = ( 82 | ); 83 | runOnlyForDeploymentPostprocessing = 0; 84 | }; 85 | /* End PBXFrameworksBuildPhase section */ 86 | 87 | /* Begin PBXGroup section */ 88 | 27FDC7831F0E24C70016D57C = { 89 | isa = PBXGroup; 90 | children = ( 91 | 27FDC78E1F0E24C70016D57C /* systemmap */, 92 | 27FDC7A81F0E24C70016D57C /* systemmapTests */, 93 | 27FDC7B31F0E24C70016D57C /* systemmapUITests */, 94 | 27FDC78D1F0E24C70016D57C /* Products */, 95 | ); 96 | sourceTree = ""; 97 | }; 98 | 27FDC78D1F0E24C70016D57C /* Products */ = { 99 | isa = PBXGroup; 100 | children = ( 101 | 27FDC78C1F0E24C70016D57C /* systemmap.app */, 102 | 27FDC7A51F0E24C70016D57C /* systemmapTests.xctest */, 103 | 27FDC7B01F0E24C70016D57C /* systemmapUITests.xctest */, 104 | ); 105 | name = Products; 106 | sourceTree = ""; 107 | }; 108 | 27FDC78E1F0E24C70016D57C /* systemmap */ = { 109 | isa = PBXGroup; 110 | children = ( 111 | 27FDC7921F0E24C70016D57C /* AppDelegate.h */, 112 | 27FDC7CC1F0E254B0016D57C /* AppDelegate.m */, 113 | 27FDC7C21F0E25350016D57C /* ViewController.h */, 114 | 27FDC7C31F0E25350016D57C /* ViewController.m */, 115 | 27FDC7C41F0E25350016D57C /* LocationConverter.h */, 116 | 27FDC7C51F0E25350016D57C /* LocationConverter.m */, 117 | 27FDC7C61F0E25350016D57C /* myAnnotation.h */, 118 | 27FDC7C71F0E25350016D57C /* myAnnotation.m */, 119 | 27FDC7CB1F0E253B0016D57C /* Header.h */, 120 | 27FDC7981F0E24C70016D57C /* Main.storyboard */, 121 | 27FDC79B1F0E24C70016D57C /* Assets.xcassets */, 122 | 27FDC79D1F0E24C70016D57C /* LaunchScreen.storyboard */, 123 | 27FDC7A01F0E24C70016D57C /* Info.plist */, 124 | 27FDC78F1F0E24C70016D57C /* Supporting Files */, 125 | ); 126 | path = systemmap; 127 | sourceTree = ""; 128 | }; 129 | 27FDC78F1F0E24C70016D57C /* Supporting Files */ = { 130 | isa = PBXGroup; 131 | children = ( 132 | 27FDC7901F0E24C70016D57C /* main.m */, 133 | ); 134 | name = "Supporting Files"; 135 | sourceTree = ""; 136 | }; 137 | 27FDC7A81F0E24C70016D57C /* systemmapTests */ = { 138 | isa = PBXGroup; 139 | children = ( 140 | 27FDC7A91F0E24C70016D57C /* systemmapTests.m */, 141 | 27FDC7AB1F0E24C70016D57C /* Info.plist */, 142 | ); 143 | path = systemmapTests; 144 | sourceTree = ""; 145 | }; 146 | 27FDC7B31F0E24C70016D57C /* systemmapUITests */ = { 147 | isa = PBXGroup; 148 | children = ( 149 | 27FDC7B41F0E24C70016D57C /* systemmapUITests.m */, 150 | 27FDC7B61F0E24C70016D57C /* Info.plist */, 151 | ); 152 | path = systemmapUITests; 153 | sourceTree = ""; 154 | }; 155 | /* End PBXGroup section */ 156 | 157 | /* Begin PBXNativeTarget section */ 158 | 27FDC78B1F0E24C70016D57C /* systemmap */ = { 159 | isa = PBXNativeTarget; 160 | buildConfigurationList = 27FDC7B91F0E24C70016D57C /* Build configuration list for PBXNativeTarget "systemmap" */; 161 | buildPhases = ( 162 | 27FDC7881F0E24C70016D57C /* Sources */, 163 | 27FDC7891F0E24C70016D57C /* Frameworks */, 164 | 27FDC78A1F0E24C70016D57C /* Resources */, 165 | ); 166 | buildRules = ( 167 | ); 168 | dependencies = ( 169 | ); 170 | name = systemmap; 171 | productName = systemmap; 172 | productReference = 27FDC78C1F0E24C70016D57C /* systemmap.app */; 173 | productType = "com.apple.product-type.application"; 174 | }; 175 | 27FDC7A41F0E24C70016D57C /* systemmapTests */ = { 176 | isa = PBXNativeTarget; 177 | buildConfigurationList = 27FDC7BC1F0E24C70016D57C /* Build configuration list for PBXNativeTarget "systemmapTests" */; 178 | buildPhases = ( 179 | 27FDC7A11F0E24C70016D57C /* Sources */, 180 | 27FDC7A21F0E24C70016D57C /* Frameworks */, 181 | 27FDC7A31F0E24C70016D57C /* Resources */, 182 | ); 183 | buildRules = ( 184 | ); 185 | dependencies = ( 186 | 27FDC7A71F0E24C70016D57C /* PBXTargetDependency */, 187 | ); 188 | name = systemmapTests; 189 | productName = systemmapTests; 190 | productReference = 27FDC7A51F0E24C70016D57C /* systemmapTests.xctest */; 191 | productType = "com.apple.product-type.bundle.unit-test"; 192 | }; 193 | 27FDC7AF1F0E24C70016D57C /* systemmapUITests */ = { 194 | isa = PBXNativeTarget; 195 | buildConfigurationList = 27FDC7BF1F0E24C70016D57C /* Build configuration list for PBXNativeTarget "systemmapUITests" */; 196 | buildPhases = ( 197 | 27FDC7AC1F0E24C70016D57C /* Sources */, 198 | 27FDC7AD1F0E24C70016D57C /* Frameworks */, 199 | 27FDC7AE1F0E24C70016D57C /* Resources */, 200 | ); 201 | buildRules = ( 202 | ); 203 | dependencies = ( 204 | 27FDC7B21F0E24C70016D57C /* PBXTargetDependency */, 205 | ); 206 | name = systemmapUITests; 207 | productName = systemmapUITests; 208 | productReference = 27FDC7B01F0E24C70016D57C /* systemmapUITests.xctest */; 209 | productType = "com.apple.product-type.bundle.ui-testing"; 210 | }; 211 | /* End PBXNativeTarget section */ 212 | 213 | /* Begin PBXProject section */ 214 | 27FDC7841F0E24C70016D57C /* Project object */ = { 215 | isa = PBXProject; 216 | attributes = { 217 | LastUpgradeCheck = 0830; 218 | ORGANIZATIONNAME = Plan; 219 | TargetAttributes = { 220 | 27FDC78B1F0E24C70016D57C = { 221 | CreatedOnToolsVersion = 8.3.1; 222 | DevelopmentTeam = HWQF636ATC; 223 | ProvisioningStyle = Automatic; 224 | }; 225 | 27FDC7A41F0E24C70016D57C = { 226 | CreatedOnToolsVersion = 8.3.1; 227 | DevelopmentTeam = HWQF636ATC; 228 | ProvisioningStyle = Automatic; 229 | TestTargetID = 27FDC78B1F0E24C70016D57C; 230 | }; 231 | 27FDC7AF1F0E24C70016D57C = { 232 | CreatedOnToolsVersion = 8.3.1; 233 | DevelopmentTeam = HWQF636ATC; 234 | ProvisioningStyle = Automatic; 235 | TestTargetID = 27FDC78B1F0E24C70016D57C; 236 | }; 237 | }; 238 | }; 239 | buildConfigurationList = 27FDC7871F0E24C70016D57C /* Build configuration list for PBXProject "systemmap" */; 240 | compatibilityVersion = "Xcode 3.2"; 241 | developmentRegion = English; 242 | hasScannedForEncodings = 0; 243 | knownRegions = ( 244 | en, 245 | Base, 246 | ); 247 | mainGroup = 27FDC7831F0E24C70016D57C; 248 | productRefGroup = 27FDC78D1F0E24C70016D57C /* Products */; 249 | projectDirPath = ""; 250 | projectRoot = ""; 251 | targets = ( 252 | 27FDC78B1F0E24C70016D57C /* systemmap */, 253 | 27FDC7A41F0E24C70016D57C /* systemmapTests */, 254 | 27FDC7AF1F0E24C70016D57C /* systemmapUITests */, 255 | ); 256 | }; 257 | /* End PBXProject section */ 258 | 259 | /* Begin PBXResourcesBuildPhase section */ 260 | 27FDC78A1F0E24C70016D57C /* Resources */ = { 261 | isa = PBXResourcesBuildPhase; 262 | buildActionMask = 2147483647; 263 | files = ( 264 | 27FDC79F1F0E24C70016D57C /* LaunchScreen.storyboard in Resources */, 265 | 27FDC79C1F0E24C70016D57C /* Assets.xcassets in Resources */, 266 | 27FDC79A1F0E24C70016D57C /* Main.storyboard in Resources */, 267 | ); 268 | runOnlyForDeploymentPostprocessing = 0; 269 | }; 270 | 27FDC7A31F0E24C70016D57C /* Resources */ = { 271 | isa = PBXResourcesBuildPhase; 272 | buildActionMask = 2147483647; 273 | files = ( 274 | ); 275 | runOnlyForDeploymentPostprocessing = 0; 276 | }; 277 | 27FDC7AE1F0E24C70016D57C /* Resources */ = { 278 | isa = PBXResourcesBuildPhase; 279 | buildActionMask = 2147483647; 280 | files = ( 281 | ); 282 | runOnlyForDeploymentPostprocessing = 0; 283 | }; 284 | /* End PBXResourcesBuildPhase section */ 285 | 286 | /* Begin PBXSourcesBuildPhase section */ 287 | 27FDC7881F0E24C70016D57C /* Sources */ = { 288 | isa = PBXSourcesBuildPhase; 289 | buildActionMask = 2147483647; 290 | files = ( 291 | 27FDC7C81F0E25350016D57C /* ViewController.m in Sources */, 292 | 27FDC7CA1F0E25350016D57C /* myAnnotation.m in Sources */, 293 | 27FDC7911F0E24C70016D57C /* main.m in Sources */, 294 | 27FDC7C91F0E25350016D57C /* LocationConverter.m in Sources */, 295 | 27FDC7CD1F0E254B0016D57C /* AppDelegate.m in Sources */, 296 | ); 297 | runOnlyForDeploymentPostprocessing = 0; 298 | }; 299 | 27FDC7A11F0E24C70016D57C /* Sources */ = { 300 | isa = PBXSourcesBuildPhase; 301 | buildActionMask = 2147483647; 302 | files = ( 303 | 27FDC7AA1F0E24C70016D57C /* systemmapTests.m in Sources */, 304 | ); 305 | runOnlyForDeploymentPostprocessing = 0; 306 | }; 307 | 27FDC7AC1F0E24C70016D57C /* Sources */ = { 308 | isa = PBXSourcesBuildPhase; 309 | buildActionMask = 2147483647; 310 | files = ( 311 | 27FDC7B51F0E24C70016D57C /* systemmapUITests.m in Sources */, 312 | ); 313 | runOnlyForDeploymentPostprocessing = 0; 314 | }; 315 | /* End PBXSourcesBuildPhase section */ 316 | 317 | /* Begin PBXTargetDependency section */ 318 | 27FDC7A71F0E24C70016D57C /* PBXTargetDependency */ = { 319 | isa = PBXTargetDependency; 320 | target = 27FDC78B1F0E24C70016D57C /* systemmap */; 321 | targetProxy = 27FDC7A61F0E24C70016D57C /* PBXContainerItemProxy */; 322 | }; 323 | 27FDC7B21F0E24C70016D57C /* PBXTargetDependency */ = { 324 | isa = PBXTargetDependency; 325 | target = 27FDC78B1F0E24C70016D57C /* systemmap */; 326 | targetProxy = 27FDC7B11F0E24C70016D57C /* PBXContainerItemProxy */; 327 | }; 328 | /* End PBXTargetDependency section */ 329 | 330 | /* Begin PBXVariantGroup section */ 331 | 27FDC7981F0E24C70016D57C /* Main.storyboard */ = { 332 | isa = PBXVariantGroup; 333 | children = ( 334 | 27FDC7991F0E24C70016D57C /* Base */, 335 | ); 336 | name = Main.storyboard; 337 | sourceTree = ""; 338 | }; 339 | 27FDC79D1F0E24C70016D57C /* LaunchScreen.storyboard */ = { 340 | isa = PBXVariantGroup; 341 | children = ( 342 | 27FDC79E1F0E24C70016D57C /* Base */, 343 | ); 344 | name = LaunchScreen.storyboard; 345 | sourceTree = ""; 346 | }; 347 | /* End PBXVariantGroup section */ 348 | 349 | /* Begin XCBuildConfiguration section */ 350 | 27FDC7B71F0E24C70016D57C /* Debug */ = { 351 | isa = XCBuildConfiguration; 352 | buildSettings = { 353 | ALWAYS_SEARCH_USER_PATHS = NO; 354 | CLANG_ANALYZER_NONNULL = YES; 355 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 356 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 357 | CLANG_CXX_LIBRARY = "libc++"; 358 | CLANG_ENABLE_MODULES = YES; 359 | CLANG_ENABLE_OBJC_ARC = YES; 360 | CLANG_WARN_BOOL_CONVERSION = YES; 361 | CLANG_WARN_CONSTANT_CONVERSION = YES; 362 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 363 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 364 | CLANG_WARN_EMPTY_BODY = YES; 365 | CLANG_WARN_ENUM_CONVERSION = YES; 366 | CLANG_WARN_INFINITE_RECURSION = YES; 367 | CLANG_WARN_INT_CONVERSION = YES; 368 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 369 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 370 | CLANG_WARN_UNREACHABLE_CODE = YES; 371 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 372 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 373 | COPY_PHASE_STRIP = NO; 374 | DEBUG_INFORMATION_FORMAT = dwarf; 375 | ENABLE_STRICT_OBJC_MSGSEND = YES; 376 | ENABLE_TESTABILITY = YES; 377 | GCC_C_LANGUAGE_STANDARD = gnu99; 378 | GCC_DYNAMIC_NO_PIC = NO; 379 | GCC_NO_COMMON_BLOCKS = YES; 380 | GCC_OPTIMIZATION_LEVEL = 0; 381 | GCC_PREPROCESSOR_DEFINITIONS = ( 382 | "DEBUG=1", 383 | "$(inherited)", 384 | ); 385 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 386 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 387 | GCC_WARN_UNDECLARED_SELECTOR = YES; 388 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 389 | GCC_WARN_UNUSED_FUNCTION = YES; 390 | GCC_WARN_UNUSED_VARIABLE = YES; 391 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 392 | MTL_ENABLE_DEBUG_INFO = YES; 393 | ONLY_ACTIVE_ARCH = YES; 394 | SDKROOT = iphoneos; 395 | TARGETED_DEVICE_FAMILY = "1,2"; 396 | }; 397 | name = Debug; 398 | }; 399 | 27FDC7B81F0E24C70016D57C /* Release */ = { 400 | isa = XCBuildConfiguration; 401 | buildSettings = { 402 | ALWAYS_SEARCH_USER_PATHS = NO; 403 | CLANG_ANALYZER_NONNULL = YES; 404 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; 405 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 406 | CLANG_CXX_LIBRARY = "libc++"; 407 | CLANG_ENABLE_MODULES = YES; 408 | CLANG_ENABLE_OBJC_ARC = YES; 409 | CLANG_WARN_BOOL_CONVERSION = YES; 410 | CLANG_WARN_CONSTANT_CONVERSION = YES; 411 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 412 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES; 413 | CLANG_WARN_EMPTY_BODY = YES; 414 | CLANG_WARN_ENUM_CONVERSION = YES; 415 | CLANG_WARN_INFINITE_RECURSION = YES; 416 | CLANG_WARN_INT_CONVERSION = YES; 417 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 418 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 419 | CLANG_WARN_UNREACHABLE_CODE = YES; 420 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 421 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 422 | COPY_PHASE_STRIP = NO; 423 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 424 | ENABLE_NS_ASSERTIONS = NO; 425 | ENABLE_STRICT_OBJC_MSGSEND = YES; 426 | GCC_C_LANGUAGE_STANDARD = gnu99; 427 | GCC_NO_COMMON_BLOCKS = YES; 428 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 429 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 430 | GCC_WARN_UNDECLARED_SELECTOR = YES; 431 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 432 | GCC_WARN_UNUSED_FUNCTION = YES; 433 | GCC_WARN_UNUSED_VARIABLE = YES; 434 | IPHONEOS_DEPLOYMENT_TARGET = 10.3; 435 | MTL_ENABLE_DEBUG_INFO = NO; 436 | SDKROOT = iphoneos; 437 | TARGETED_DEVICE_FAMILY = "1,2"; 438 | VALIDATE_PRODUCT = YES; 439 | }; 440 | name = Release; 441 | }; 442 | 27FDC7BA1F0E24C70016D57C /* Debug */ = { 443 | isa = XCBuildConfiguration; 444 | buildSettings = { 445 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 446 | DEVELOPMENT_TEAM = HWQF636ATC; 447 | INFOPLIST_FILE = systemmap/Info.plist; 448 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 449 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 450 | PRODUCT_BUNDLE_IDENTIFIER = com.Plan.systemmap; 451 | PRODUCT_NAME = "$(TARGET_NAME)"; 452 | }; 453 | name = Debug; 454 | }; 455 | 27FDC7BB1F0E24C70016D57C /* Release */ = { 456 | isa = XCBuildConfiguration; 457 | buildSettings = { 458 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 459 | DEVELOPMENT_TEAM = HWQF636ATC; 460 | INFOPLIST_FILE = systemmap/Info.plist; 461 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 462 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 463 | PRODUCT_BUNDLE_IDENTIFIER = com.Plan.systemmap; 464 | PRODUCT_NAME = "$(TARGET_NAME)"; 465 | }; 466 | name = Release; 467 | }; 468 | 27FDC7BD1F0E24C70016D57C /* Debug */ = { 469 | isa = XCBuildConfiguration; 470 | buildSettings = { 471 | BUNDLE_LOADER = "$(TEST_HOST)"; 472 | DEVELOPMENT_TEAM = HWQF636ATC; 473 | INFOPLIST_FILE = systemmapTests/Info.plist; 474 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 475 | PRODUCT_BUNDLE_IDENTIFIER = com.Plan.systemmapTests; 476 | PRODUCT_NAME = "$(TARGET_NAME)"; 477 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/systemmap.app/systemmap"; 478 | }; 479 | name = Debug; 480 | }; 481 | 27FDC7BE1F0E24C70016D57C /* Release */ = { 482 | isa = XCBuildConfiguration; 483 | buildSettings = { 484 | BUNDLE_LOADER = "$(TEST_HOST)"; 485 | DEVELOPMENT_TEAM = HWQF636ATC; 486 | INFOPLIST_FILE = systemmapTests/Info.plist; 487 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 488 | PRODUCT_BUNDLE_IDENTIFIER = com.Plan.systemmapTests; 489 | PRODUCT_NAME = "$(TARGET_NAME)"; 490 | TEST_HOST = "$(BUILT_PRODUCTS_DIR)/systemmap.app/systemmap"; 491 | }; 492 | name = Release; 493 | }; 494 | 27FDC7C01F0E24C70016D57C /* Debug */ = { 495 | isa = XCBuildConfiguration; 496 | buildSettings = { 497 | DEVELOPMENT_TEAM = HWQF636ATC; 498 | INFOPLIST_FILE = systemmapUITests/Info.plist; 499 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 500 | PRODUCT_BUNDLE_IDENTIFIER = com.Plan.systemmapUITests; 501 | PRODUCT_NAME = "$(TARGET_NAME)"; 502 | TEST_TARGET_NAME = systemmap; 503 | }; 504 | name = Debug; 505 | }; 506 | 27FDC7C11F0E24C70016D57C /* Release */ = { 507 | isa = XCBuildConfiguration; 508 | buildSettings = { 509 | DEVELOPMENT_TEAM = HWQF636ATC; 510 | INFOPLIST_FILE = systemmapUITests/Info.plist; 511 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; 512 | PRODUCT_BUNDLE_IDENTIFIER = com.Plan.systemmapUITests; 513 | PRODUCT_NAME = "$(TARGET_NAME)"; 514 | TEST_TARGET_NAME = systemmap; 515 | }; 516 | name = Release; 517 | }; 518 | /* End XCBuildConfiguration section */ 519 | 520 | /* Begin XCConfigurationList section */ 521 | 27FDC7871F0E24C70016D57C /* Build configuration list for PBXProject "systemmap" */ = { 522 | isa = XCConfigurationList; 523 | buildConfigurations = ( 524 | 27FDC7B71F0E24C70016D57C /* Debug */, 525 | 27FDC7B81F0E24C70016D57C /* Release */, 526 | ); 527 | defaultConfigurationIsVisible = 0; 528 | defaultConfigurationName = Release; 529 | }; 530 | 27FDC7B91F0E24C70016D57C /* Build configuration list for PBXNativeTarget "systemmap" */ = { 531 | isa = XCConfigurationList; 532 | buildConfigurations = ( 533 | 27FDC7BA1F0E24C70016D57C /* Debug */, 534 | 27FDC7BB1F0E24C70016D57C /* Release */, 535 | ); 536 | defaultConfigurationIsVisible = 0; 537 | defaultConfigurationName = Release; 538 | }; 539 | 27FDC7BC1F0E24C70016D57C /* Build configuration list for PBXNativeTarget "systemmapTests" */ = { 540 | isa = XCConfigurationList; 541 | buildConfigurations = ( 542 | 27FDC7BD1F0E24C70016D57C /* Debug */, 543 | 27FDC7BE1F0E24C70016D57C /* Release */, 544 | ); 545 | defaultConfigurationIsVisible = 0; 546 | defaultConfigurationName = Release; 547 | }; 548 | 27FDC7BF1F0E24C70016D57C /* Build configuration list for PBXNativeTarget "systemmapUITests" */ = { 549 | isa = XCConfigurationList; 550 | buildConfigurations = ( 551 | 27FDC7C01F0E24C70016D57C /* Debug */, 552 | 27FDC7C11F0E24C70016D57C /* Release */, 553 | ); 554 | defaultConfigurationIsVisible = 0; 555 | defaultConfigurationName = Release; 556 | }; 557 | /* End XCConfigurationList section */ 558 | }; 559 | rootObject = 27FDC7841F0E24C70016D57C /* Project object */; 560 | } 561 | -------------------------------------------------------------------------------- /systemmap/systemmap.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /systemmap/systemmap.xcodeproj/project.xcworkspace/xcuserdata/anan.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2877025939/iOS-map/5726ded7cb83f7f067ea38ef8254e69c4819a2ee/systemmap/systemmap.xcodeproj/project.xcworkspace/xcuserdata/anan.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /systemmap/systemmap.xcodeproj/xcuserdata/anan.xcuserdatad/xcschemes/systemmap.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 33 | 39 | 40 | 41 | 43 | 49 | 50 | 51 | 52 | 53 | 59 | 60 | 61 | 62 | 63 | 64 | 74 | 76 | 82 | 83 | 84 | 85 | 86 | 87 | 93 | 95 | 101 | 102 | 103 | 104 | 106 | 107 | 110 | 111 | 112 | -------------------------------------------------------------------------------- /systemmap/systemmap.xcodeproj/xcuserdata/anan.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | systemmap.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 27FDC78B1F0E24C70016D57C 16 | 17 | primary 18 | 19 | 20 | 27FDC7A41F0E24C70016D57C 21 | 22 | primary 23 | 24 | 25 | 27FDC7AF1F0E24C70016D57C 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /systemmap/systemmap/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // systemmap 4 | // 5 | // Created by anan on 2017/7/6. 6 | // Copyright © 2017年 Plan. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /systemmap/systemmap/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // 系统高德地图 4 | // 5 | // Created by anan on 2017/7/4. 6 | // Copyright © 2017年 Plan. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "ViewController.h" 11 | @interface AppDelegate () 12 | 13 | @end 14 | 15 | @implementation AppDelegate 16 | 17 | 18 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 19 | // Override point for customization after application launch. 20 | 21 | ViewController *VC = [[ViewController alloc]init]; 22 | 23 | UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:VC]; 24 | 25 | self.window.rootViewController = nav; 26 | 27 | return YES; 28 | } 29 | 30 | 31 | - (void)applicationWillResignActive:(UIApplication *)application { 32 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 33 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 34 | } 35 | 36 | 37 | - (void)applicationDidEnterBackground:(UIApplication *)application { 38 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 39 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 40 | } 41 | 42 | 43 | - (void)applicationWillEnterForeground:(UIApplication *)application { 44 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 45 | } 46 | 47 | 48 | - (void)applicationDidBecomeActive:(UIApplication *)application { 49 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 50 | } 51 | 52 | 53 | - (void)applicationWillTerminate:(UIApplication *)application { 54 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 55 | } 56 | 57 | 58 | @end 59 | -------------------------------------------------------------------------------- /systemmap/systemmap/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "20x20", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "20x20", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "29x29", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "29x29", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "40x40", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "40x40", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "iphone", 35 | "size" : "60x60", 36 | "scale" : "2x" 37 | }, 38 | { 39 | "idiom" : "iphone", 40 | "size" : "60x60", 41 | "scale" : "3x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "20x20", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "20x20", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "29x29", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "29x29", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "idiom" : "ipad", 65 | "size" : "40x40", 66 | "scale" : "1x" 67 | }, 68 | { 69 | "idiom" : "ipad", 70 | "size" : "40x40", 71 | "scale" : "2x" 72 | }, 73 | { 74 | "idiom" : "ipad", 75 | "size" : "76x76", 76 | "scale" : "1x" 77 | }, 78 | { 79 | "idiom" : "ipad", 80 | "size" : "76x76", 81 | "scale" : "2x" 82 | }, 83 | { 84 | "idiom" : "ipad", 85 | "size" : "83.5x83.5", 86 | "scale" : "2x" 87 | } 88 | ], 89 | "info" : { 90 | "version" : 1, 91 | "author" : "xcode" 92 | } 93 | } -------------------------------------------------------------------------------- /systemmap/systemmap/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /systemmap/systemmap/Assets.xcassets/icon_direction.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "icon_direction.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /systemmap/systemmap/Assets.xcassets/icon_direction.imageset/icon_direction.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2877025939/iOS-map/5726ded7cb83f7f067ea38ef8254e69c4819a2ee/systemmap/systemmap/Assets.xcassets/icon_direction.imageset/icon_direction.png -------------------------------------------------------------------------------- /systemmap/systemmap/Assets.xcassets/icon_end.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "icon_end.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /systemmap/systemmap/Assets.xcassets/icon_end.imageset/icon_end.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2877025939/iOS-map/5726ded7cb83f7f067ea38ef8254e69c4819a2ee/systemmap/systemmap/Assets.xcassets/icon_end.imageset/icon_end.png -------------------------------------------------------------------------------- /systemmap/systemmap/Assets.xcassets/icon_start.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "icon_start.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "scale" : "3x" 15 | } 16 | ], 17 | "info" : { 18 | "version" : 1, 19 | "author" : "xcode" 20 | } 21 | } -------------------------------------------------------------------------------- /systemmap/systemmap/Assets.xcassets/icon_start.imageset/icon_start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2877025939/iOS-map/5726ded7cb83f7f067ea38ef8254e69c4819a2ee/systemmap/systemmap/Assets.xcassets/icon_start.imageset/icon_start.png -------------------------------------------------------------------------------- /systemmap/systemmap/Assets.xcassets/map.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "map@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "map@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /systemmap/systemmap/Assets.xcassets/map.imageset/map@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2877025939/iOS-map/5726ded7cb83f7f067ea38ef8254e69c4819a2ee/systemmap/systemmap/Assets.xcassets/map.imageset/map@2x.png -------------------------------------------------------------------------------- /systemmap/systemmap/Assets.xcassets/map.imageset/map@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2877025939/iOS-map/5726ded7cb83f7f067ea38ef8254e69c4819a2ee/systemmap/systemmap/Assets.xcassets/map.imageset/map@3x.png -------------------------------------------------------------------------------- /systemmap/systemmap/Assets.xcassets/map1.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "map1@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "map1@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /systemmap/systemmap/Assets.xcassets/map1.imageset/map1@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2877025939/iOS-map/5726ded7cb83f7f067ea38ef8254e69c4819a2ee/systemmap/systemmap/Assets.xcassets/map1.imageset/map1@2x.png -------------------------------------------------------------------------------- /systemmap/systemmap/Assets.xcassets/map1.imageset/map1@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/2877025939/iOS-map/5726ded7cb83f7f067ea38ef8254e69c4819a2ee/systemmap/systemmap/Assets.xcassets/map1.imageset/map1@3x.png -------------------------------------------------------------------------------- /systemmap/systemmap/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /systemmap/systemmap/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /systemmap/systemmap/Header.h: -------------------------------------------------------------------------------- 1 | // 2 | // Header.h 3 | // 系统高德地图 4 | // 5 | // Created by anan on 2017/7/5. 6 | // Copyright © 2017年 Plan. All rights reserved. 7 | // 8 | 9 | #ifndef Header_h 10 | #define Header_h 11 | 12 | 13 | #ifndef __OPTIMIZE__ 14 | #define NSLog(...) NSLog(__VA_ARGS__) 15 | #else 16 | #define NSLog(...) {} 17 | #endif 18 | 19 | #endif /* Header_h */ 20 | -------------------------------------------------------------------------------- /systemmap/systemmap/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | LSApplicationQueriesSchemes 6 | 7 | iosamap 8 | baidumap 9 | qqmap 10 | 11 | NSLocationWhenInUseUsageDescription 12 | 使用期间允许定位 13 | CFBundleDevelopmentRegion 14 | en 15 | CFBundleExecutable 16 | $(EXECUTABLE_NAME) 17 | CFBundleIdentifier 18 | $(PRODUCT_BUNDLE_IDENTIFIER) 19 | CFBundleInfoDictionaryVersion 20 | 6.0 21 | CFBundleName 22 | $(PRODUCT_NAME) 23 | CFBundlePackageType 24 | APPL 25 | CFBundleShortVersionString 26 | 1.0 27 | CFBundleVersion 28 | 1 29 | LSRequiresIPhoneOS 30 | 31 | UILaunchStoryboardName 32 | LaunchScreen 33 | UIMainStoryboardFile 34 | Main 35 | UIRequiredDeviceCapabilities 36 | 37 | armv7 38 | 39 | UISupportedInterfaceOrientations 40 | 41 | UIInterfaceOrientationPortrait 42 | UIInterfaceOrientationLandscapeLeft 43 | UIInterfaceOrientationLandscapeRight 44 | 45 | UISupportedInterfaceOrientations~ipad 46 | 47 | UIInterfaceOrientationPortrait 48 | UIInterfaceOrientationPortraitUpsideDown 49 | UIInterfaceOrientationLandscapeLeft 50 | UIInterfaceOrientationLandscapeRight 51 | 52 | 53 | 54 | -------------------------------------------------------------------------------- /systemmap/systemmap/LocationConverter.h: -------------------------------------------------------------------------------- 1 | // 2 | // LocationConverter.h 3 | // 系统高德地图 4 | // 5 | // Created by anan on 2017/7/5. 6 | // Copyright © 2017年 Plan. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | @interface LocationConverter : NSObject 13 | /** 14 | 15 | * 判断是否在中国 16 | 17 | */ 18 | 19 | +(BOOL)isLocationOutOfChina:(CLLocationCoordinate2D)location; 20 | 21 | /** 22 | 23 | * 将WGS-84转为GCJ-02(火星坐标): 24 | 25 | */ 26 | 27 | +(CLLocationCoordinate2D)transformFromWGSToGCJ:(CLLocationCoordinate2D)wgsLoc; 28 | 29 | /** 30 | 31 | * 将GCJ-02(火星坐标)转为百度坐标: 32 | 33 | */ 34 | 35 | +(CLLocationCoordinate2D)transformFromGCJToBaidu:(CLLocationCoordinate2D)p; 36 | 37 | /** 38 | 39 | * 将百度坐标转为GCJ-02(火星坐标): 40 | 41 | */ 42 | 43 | +(CLLocationCoordinate2D)transformFromBaiduToGCJ:(CLLocationCoordinate2D)p; 44 | 45 | /** 46 | 47 | * 将GCJ-02(火星坐标)转为WGS-84: 48 | 49 | */ 50 | 51 | +(CLLocationCoordinate2D)transformFromGCJToWGS:(CLLocationCoordinate2D)p; 52 | @end 53 | -------------------------------------------------------------------------------- /systemmap/systemmap/LocationConverter.m: -------------------------------------------------------------------------------- 1 | // 2 | // LocationConverter.m 3 | // 系统高德地图 4 | // 5 | // Created by anan on 2017/7/5. 6 | // Copyright © 2017年 Plan. All rights reserved. 7 | // 8 | 9 | #import "LocationConverter.h" 10 | 11 | 12 | static const double a = 6378245.0; 13 | 14 | static const double ee = 0.00669342162296594323; 15 | 16 | static const double pi = 3.14159265358979324; 17 | 18 | static const double xPi = M_PI * 3000.0 / 180.0; 19 | 20 | @implementation LocationConverter 21 | 22 | +(CLLocationCoordinate2D)transformFromWGSToGCJ:(CLLocationCoordinate2D)wgsLoc{ 23 | 24 | CLLocationCoordinate2D adjustLoc; 25 | 26 | if([self isLocationOutOfChina:wgsLoc]){ 27 | 28 | adjustLoc = wgsLoc; 29 | 30 | } 31 | 32 | else{ 33 | 34 | double adjustLat = [self transformLatWithX:wgsLoc.longitude - 105.0 withY:wgsLoc.latitude - 35.0]; 35 | 36 | double adjustLon = [self transformLonWithX:wgsLoc.longitude - 105.0 withY:wgsLoc.latitude - 35.0]; 37 | 38 | long double radLat = wgsLoc.latitude / 180.0 * pi; 39 | 40 | long double magic = sin(radLat); 41 | 42 | magic = 1 - ee * magic * magic; 43 | 44 | long double sqrtMagic = sqrt(magic); 45 | 46 | adjustLat = (adjustLat * 180.0) / ((a * (1 - ee)) / (magic * sqrtMagic) * pi); 47 | 48 | adjustLon = (adjustLon * 180.0) / (a / sqrtMagic * cos(radLat) * pi); 49 | 50 | adjustLoc.latitude = wgsLoc.latitude + adjustLat; 51 | 52 | adjustLoc.longitude = wgsLoc.longitude + adjustLon; 53 | 54 | } 55 | 56 | return adjustLoc; 57 | 58 | } 59 | 60 | + (double)transformLatWithX:(double)x withY:(double)y{ 61 | 62 | double lat = -100.0 + 2.0 * x + 3.0 * y + 0.2 * y * y + 0.1 * x * y + 0.2 * sqrt(fabs(x)); 63 | 64 | lat += (20.0 * sin(6.0 * x * pi) + 20.0 *sin(2.0 * x * pi)) * 2.0 / 3.0; 65 | 66 | lat += (20.0 * sin(y * pi) + 40.0 * sin(y / 3.0 * pi)) * 2.0 / 3.0; 67 | 68 | lat += (160.0 * sin(y / 12.0 * pi) + 320 * sin(y * pi / 30.0)) * 2.0 / 3.0; 69 | 70 | return lat; 71 | 72 | } 73 | 74 | + (double)transformLonWithX:(double)x withY:(double)y{ 75 | 76 | double lon = 300.0 + x + 2.0 * y + 0.1 * x * x + 0.1 * x * y + 0.1 * sqrt(fabs(x)); 77 | 78 | lon += (20.0 * sin(6.0 * x * pi) + 20.0 * sin(2.0 * x * pi)) * 2.0 / 3.0; 79 | 80 | lon += (20.0 * sin(x * pi) + 40.0 * sin(x / 3.0 * pi)) * 2.0 / 3.0; 81 | 82 | lon += (150.0 * sin(x / 12.0 * pi) + 300.0 * sin(x / 30.0 * pi)) * 2.0 / 3.0; 83 | 84 | return lon; 85 | 86 | } 87 | 88 | +(CLLocationCoordinate2D)transformFromGCJToBaidu:(CLLocationCoordinate2D)p{ 89 | 90 | long double z = sqrt(p.longitude * p.longitude + p.latitude * p.latitude) + 0.00002 * sqrt(p.latitude * pi); 91 | 92 | long double theta = atan2(p.latitude, p.longitude) + 0.000003 * cos(p.longitude * pi); 93 | 94 | CLLocationCoordinate2D geoPoint; 95 | 96 | geoPoint.latitude = (z * sin(theta) + 0.006); 97 | 98 | geoPoint.longitude = (z * cos(theta) + 0.0065); 99 | 100 | return geoPoint; 101 | 102 | } 103 | 104 | +(CLLocationCoordinate2D)transformFromBaiduToGCJ:(CLLocationCoordinate2D)p{ 105 | 106 | double x = p.longitude - 0.0065, y = p.latitude - 0.006; 107 | 108 | double z = sqrt(x * x + y * y) - 0.00002 * sin(y * xPi); 109 | 110 | double theta = atan2(y, x) - 0.000003 * cos(x * xPi); 111 | 112 | CLLocationCoordinate2D geoPoint; 113 | 114 | geoPoint.latitude = z * sin(theta); 115 | 116 | geoPoint.longitude = z * cos(theta); 117 | 118 | return geoPoint; 119 | 120 | } 121 | 122 | +(CLLocationCoordinate2D)transformFromGCJToWGS:(CLLocationCoordinate2D)p{ 123 | 124 | double threshold = 0.00001; 125 | 126 | // The boundary 127 | 128 | double minLat = p.latitude - 0.5; 129 | 130 | double maxLat = p.latitude + 0.5; 131 | 132 | double minLng = p.longitude - 0.5; 133 | 134 | double maxLng = p.longitude + 0.5; 135 | 136 | double delta = 1; 137 | 138 | int maxIteration = 30; 139 | 140 | // Binary search 141 | 142 | while(true){ 143 | 144 | CLLocationCoordinate2D leftBottom = [[self class] transformFromWGSToGCJ:(CLLocationCoordinate2D){.latitude = minLat,.longitude = minLng}]; 145 | 146 | CLLocationCoordinate2D rightBottom = [[self class] transformFromWGSToGCJ:(CLLocationCoordinate2D){.latitude = minLat,.longitude = maxLng}]; 147 | 148 | CLLocationCoordinate2D leftUp = [[self class] transformFromWGSToGCJ:(CLLocationCoordinate2D){.latitude = maxLat,.longitude = minLng}]; 149 | 150 | CLLocationCoordinate2D midPoint = [[self class] transformFromWGSToGCJ:(CLLocationCoordinate2D){.latitude = ((minLat + maxLat) / 2),.longitude = ((minLng + maxLng) / 2)}]; 151 | 152 | delta = fabs(midPoint.latitude - p.latitude) + fabs(midPoint.longitude - p.longitude); 153 | 154 | if(maxIteration-- <= 0 || delta <= threshold){ 155 | 156 | return (CLLocationCoordinate2D){.latitude = ((minLat + maxLat) / 2),.longitude = ((minLng + maxLng) / 2)}; 157 | 158 | } 159 | 160 | if(isContains(p, leftBottom, midPoint)){ 161 | 162 | maxLat = (minLat + maxLat) / 2; 163 | 164 | maxLng = (minLng + maxLng) / 2; 165 | 166 | }else if(isContains(p, rightBottom, midPoint)){ 167 | 168 | maxLat = (minLat + maxLat) / 2; 169 | 170 | minLng = (minLng + maxLng) / 2; 171 | 172 | }else if(isContains(p, leftUp, midPoint)){ 173 | 174 | minLat = (minLat + maxLat) / 2; 175 | 176 | maxLng = (minLng + maxLng) / 2; 177 | 178 | }else{ 179 | 180 | minLat = (minLat + maxLat) / 2; 181 | 182 | minLng = (minLng + maxLng) / 2; 183 | 184 | } 185 | 186 | } 187 | 188 | } 189 | 190 | static bool isContains(CLLocationCoordinate2D point, CLLocationCoordinate2D p1, CLLocationCoordinate2D p2){ 191 | 192 | return (point.latitude >= MIN(p1.latitude, p2.latitude) && point.latitude <= MAX(p1.latitude, p2.latitude)) && (point.longitude >= MIN(p1.longitude,p2.longitude) && point.longitude <= MAX(p1.longitude, p2.longitude)); 193 | 194 | } 195 | 196 | /** 197 | 198 | * 判断是不是在中国 199 | 200 | */ 201 | 202 | +(BOOL)isLocationOutOfChina:(CLLocationCoordinate2D)location{ 203 | 204 | if (location.longitude < 72.004 || location.longitude > 137.8347 || location.latitude < 0.8293 || location.latitude > 55.8271) 205 | 206 | return YES; 207 | 208 | return NO; 209 | 210 | } 211 | @end 212 | -------------------------------------------------------------------------------- /systemmap/systemmap/ViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // 系统高德地图 4 | // 5 | // Created by anan on 2017/7/4. 6 | // Copyright © 2017年 Plan. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface ViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /systemmap/systemmap/ViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // 系统高德地图 4 | // 5 | // Created by anan on 2017/7/4. 6 | // Copyright © 2017年 Plan. All rights reserved. 7 | // 8 | 9 | #import "ViewController.h" 10 | #import "Header.h" 11 | #import 12 | #import 13 | #import "myAnnotation.h" 14 | 15 | #define moreiOS8 ([UIDevice currentDevice].systemVersion.doubleValue >= 8.0) 16 | 17 | @interface ViewController (){ 18 | 19 | double _latitude; 20 | double _longitude; 21 | double _myLatitude; 22 | double _myLongitude; 23 | } 24 | 25 | /** 定位 */ 26 | @property (nonatomic,strong) CLLocationManager *locationManager; 27 | /** 地图 */ 28 | @property (nonatomic,strong) MKMapView * mapView; 29 | /** 地理编码 */ 30 | @property (nonatomic, strong) CLGeocoder *geoC; 31 | 32 | /** 目标位置标题 */ 33 | @property (nonatomic,copy) NSString *str; 34 | 35 | /** 发送请求给服务器 */ 36 | @property (nonatomic,strong) MKDirections *directions; 37 | 38 | @end 39 | 40 | @implementation ViewController 41 | 42 | - (void)viewDidLoad { 43 | [super viewDidLoad]; 44 | 45 | 46 | UIBarButtonItem *rightItem = [[UIBarButtonItem alloc]initWithTitle:@"规划" style:UIBarButtonItemStylePlain target:self action:@selector(click)]; 47 | self.navigationItem.rightBarButtonItem = rightItem; 48 | 49 | UIBarButtonItem *leftItem = [[UIBarButtonItem alloc]initWithTitle:@"导航" style:UIBarButtonItemStylePlain target:self action:@selector(leftClick)]; 50 | self.navigationItem.leftBarButtonItem = leftItem; 51 | 52 | [self createMap]; 53 | 54 | [self createLocation]; 55 | 56 | [self createGeoC1]; 57 | 58 | } 59 | 60 | -(void)createMap{ 61 | 62 | self.mapView = [[MKMapView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)]; 63 | self.mapView.mapType = MKMapTypeStandard; 64 | //显示指南针 65 | self.mapView.showsCompass = YES; 66 | //显示比例尺 67 | self.mapView.showsScale = YES; 68 | //显示用户所在的位置 69 | self.mapView.showsUserLocation = YES; 70 | 71 | 72 | self.mapView.delegate =self; 73 | 74 | [self.view addSubview:self.mapView]; 75 | 76 | //一些属性 可以自己看一下啊 77 | // 显示感兴趣的东西 78 | // self.mapView.showsPointsOfInterest = YES; 79 | // //定义显示的范围span范围 80 | // MKCoordinateSpan theSpan; 81 | // theSpan.latitudeDelta =0.01; 82 | // theSpan.longitudeDelta =0.01; 83 | // //定义显示的区域 region区域范围 84 | // MKCoordinateRegion theRegion; 85 | // // theRegion.center = theCoordinate; 86 | // theRegion.span=theSpan; 87 | // //显示交通状况 88 | // self.mapView.showsTraffic = YES; 89 | // //显示建筑物 90 | // self.mapView.showsBuildings = YES; 91 | } 92 | 93 | -(void)createLocation{ 94 | 95 | if ( [CLLocationManager locationServicesEnabled]) { 96 | NSLog(@"可以定位"); 97 | 98 | self.locationManager = [[CLLocationManager alloc]init]; 99 | 100 | self.locationManager.delegate = self; 101 | //设置定位精度 102 | self.locationManager.desiredAccuracy = kCLLocationAccuracyBest; 103 | //设置距离 104 | self.locationManager.distanceFilter = 50; 105 | //申请定位许可,iOS8以后特有 106 | if([self.locationManager respondsToSelector:@selector(requestWhenInUseAuthorization)]) { 107 | 108 | [self.locationManager requestWhenInUseAuthorization]; 109 | } 110 | 111 | 112 | //开始定位 113 | [self.locationManager startUpdatingLocation]; 114 | 115 | }else{ 116 | 117 | NSLog(@"请打开定位权限"); 118 | } 119 | } 120 | 121 | -(void)createGeoC1{ 122 | 123 | self.geoC = [[CLGeocoder alloc] init]; 124 | 125 | //获取目标位置 126 | [self test]; 127 | } 128 | 129 | //添加大头针 130 | -(void)addAnnoWithPT:(CLLocationCoordinate2D)pt{ 131 | 132 | myAnnotation *anno = [[myAnnotation alloc] init]; 133 | anno.coordinate = pt; 134 | anno.title = self.str; 135 | anno.subtitle = @"张江药谷大厦"; 136 | [self.mapView addAnnotation:anno]; 137 | 138 | } 139 | 140 | #pragma mark - 定位代理方法 141 | //locationManager:didUpdateLocations:(调用很频繁) 142 | - (void)locationManager:(CLLocationManager *)manager 143 | didUpdateLocations:(NSArray *)locations{ 144 | 145 | //定位: 146 | CLLocation *currLocation =[locations lastObject]; 147 | NSLog(@"定位方法: %@ ",currLocation.description); 148 | //重置定位 149 | CLLocationCoordinate2D theCoordinate; 150 | 151 | //latitude纬度 152 | theCoordinate.latitude = currLocation.coordinate.latitude; 153 | //longitude经度 154 | theCoordinate.longitude = currLocation.coordinate.longitude; 155 | 156 | _myLatitude = currLocation.coordinate.latitude; 157 | _myLongitude = currLocation.coordinate.longitude; 158 | 159 | //定义显示的范围span范围 160 | MKCoordinateSpan theSpan; 161 | theSpan.latitudeDelta =0.01; 162 | theSpan.longitudeDelta =0.01; 163 | 164 | //定义显示的区域 region区域范围 165 | MKCoordinateRegion theRegion; 166 | theRegion.center = theCoordinate; 167 | theRegion.span = theSpan; 168 | 169 | //设置地图显示 170 | [self.mapView setRegion:theRegion]; 171 | 172 | 173 | 174 | // CLLocationCoordinate2D theCoordinate1; 175 | // //latitude纬度 176 | // theCoordinate1.latitude = 31.193806; 177 | // //longitude经度 178 | // theCoordinate1.longitude = 121.606917; 179 | // 180 | // 181 | // CLLocationCoordinate2D theCoordinate2; 182 | // 183 | // //latitude纬度 184 | // theCoordinate2.latitude = 31.191285; 185 | // //longitude经度 186 | // theCoordinate2.longitude = 121.607031; 187 | // 188 | // //添加大头针 189 | // [self addAnnoWithPT:theCoordinate1]; 190 | // 191 | // [self addAnnoWithPT:theCoordinate2]; 192 | 193 | } 194 | 195 | //定位失败 196 | 197 | - (void)locationManager:(CLLocationManager *)manager 198 | didFailWithError:(NSError *)error{ 199 | 200 | NSLog(@"定位失败error%@",error); 201 | } 202 | 203 | //方向的更新 204 | - (void)locationManager:(CLLocationManager *)manager 205 | didUpdateHeading:(CLHeading *)newHeading{ 206 | 207 | } 208 | 209 | //用于判断是否显示方向的校对,用于判断是否显示方向的校对,返回yes的时候,将会校对正确之后才会停止 210 | //或者dismissheadingcalibrationdisplay方法解除。 211 | -(BOOL)locationManagerShouldDisplayHeadingCalibration:(CLLocationManager *)manager{ 212 | 213 | return YES; 214 | } 215 | 216 | 217 | #pragma mark - 地图代理方法有 218 | //一个位置更改默认只会调用一次,不断监测用户的当前位置 219 | //每次调用,都会把用户的最新位置(userLocation参数)传进来 220 | - (void)mapView:(MKMapView *)mapView didUpdateUserLocation:(MKUserLocation *)userLocation{ 221 | 222 | userLocation.title = @"现在位置"; 223 | 224 | 225 | CLLocationCoordinate2D theCoordinate; 226 | //latitude纬度 227 | theCoordinate.latitude = userLocation.coordinate.latitude; 228 | //longitude经度 229 | theCoordinate.longitude= userLocation.coordinate.longitude; 230 | [self.mapView setCenterCoordinate:theCoordinate animated:YES]; 231 | NSLog(@"用户定位: %f %f",userLocation.coordinate.latitude,userLocation.coordinate.longitude); 232 | 233 | } 234 | 235 | //地图的显示区域即将发生改变的时候调用 236 | - (void)mapView:(MKMapView *)mapView regionWillChangeAnimated:(BOOL)animated{ 237 | 238 | } 239 | 240 | //地图的显示区域已经发生改变的时候调用 241 | - (void)mapView:(MKMapView *)mapView regionDidChangeAnimated:(BOOL)animated{ 242 | 243 | } 244 | 245 | 246 | //设置大头针 247 | - (nullable MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id )annotation{ 248 | 249 | // 判断大头针位置是否在原点,如果是则不加大头针 250 | if([annotation isKindOfClass:[mapView.userLocation class]]){ 251 | return nil; 252 | } 253 | 254 | static NSString *inden = @"pappao"; 255 | MKAnnotationView *pin = [mapView dequeueReusableAnnotationViewWithIdentifier:inden]; 256 | if (pin == nil) { 257 | pin = [[MKAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:inden]; 258 | } 259 | 260 | pin.annotation = annotation; 261 | // 设置是否弹出标注 262 | pin.canShowCallout = YES; 263 | pin.image = [UIImage imageNamed:@"map"]; 264 | pin.draggable = YES; 265 | 266 | //弹出视图 267 | UIImageView *imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 20, 25)]; 268 | imageView.image = [UIImage imageNamed:@"map1"]; 269 | pin.leftCalloutAccessoryView = imageView; 270 | 271 | return pin; 272 | 273 | } 274 | 275 | #pragma mark - 地理编码 276 | -(void)test{ 277 | 278 | //根据位置名称转换经纬度 279 | [self.geoC geocodeAddressString:@"凯信国际广场" completionHandler:^(NSArray * _Nullable placemarks, NSError * _Nullable error) { 280 | /** 281 | * CLPlacemark 282 | location : 位置对象 283 | addressDictionary : 地址字典 284 | name : 地址全称 285 | */ 286 | if(error == nil){ 287 | NSLog(@"%@", placemarks); 288 | [placemarks enumerateObjectsUsingBlock:^(CLPlacemark * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { 289 | 290 | NSLog(@"目标位置: %@ %f %f", obj.name, obj.location.coordinate.latitude,obj.location.coordinate.longitude); 291 | CLLocationCoordinate2D coordinate; 292 | //latitude纬度 293 | coordinate.latitude = obj.location.coordinate.latitude; 294 | //longitude经度 295 | coordinate.longitude= obj.location.coordinate.longitude; 296 | 297 | _latitude = obj.location.coordinate.latitude; 298 | _longitude = obj.location.coordinate.longitude; 299 | 300 | //计算两个坐标之间的位置 301 | CLLocation *location1 = [[CLLocation alloc] initWithLatitude:_latitude longitude:_longitude]; 302 | CLLocation *location2 = [[CLLocation alloc] initWithLatitude:_myLatitude longitude:_myLongitude]; 303 | 304 | float distance = [location1 distanceFromLocation:location2]; 305 | 306 | NSLog(@"distance %f",distance); 307 | 308 | self.str = [NSString stringWithFormat:@"距离:%.3fkm",distance/1000]; 309 | 310 | //添加大头针 311 | [self addAnnoWithPT:coordinate]; 312 | 313 | 314 | }]; 315 | }else{ 316 | NSLog(@"cuowu--%@", error.localizedDescription); 317 | } 318 | 319 | }]; 320 | 321 | } 322 | 323 | #pragma mark - 反地理编码 324 | -(void)testLatitude:(CLLocationDegrees)latitude 325 | longitude:(CLLocationDegrees)longitude{ 326 | 327 | 328 | //地理反编码根据经纬度,获取位置信息 329 | CLLocation *loc = [[CLLocation alloc] initWithLatitude:latitude longitude:longitude]; 330 | 331 | [self.geoC reverseGeocodeLocation:loc completionHandler:^(NSArray * _Nullable placemarks, NSError * _Nullable error) { 332 | if(error == nil) 333 | { 334 | NSLog(@"%@", placemarks); 335 | 336 | [placemarks enumerateObjectsUsingBlock:^(CLPlacemark * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) { 337 | NSLog(@"%@\n ", obj.name); 338 | 339 | }]; 340 | }else 341 | { 342 | NSLog(@"cuowu"); 343 | } 344 | 345 | }]; 346 | 347 | } 348 | 349 | 350 | #pragma mark - 触摸手势 351 | //-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{ 352 | 353 | // // 1. 获取当前触摸点 354 | // CGPoint point = [[touches anyObject] locationInView:self.mapView]; 355 | // 356 | // // 2. 转换成经纬度 357 | // CLLocationCoordinate2D pt = [self.mapView convertPoint:point toCoordinateFromView:self.mapView]; 358 | // 359 | // // 3. 添加大头针 360 | // [self addAnnoWithPT:pt]; 361 | 362 | //} 363 | 364 | //-(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{ 365 | // // 移除大头针(模型) 366 | // NSArray *annos = self.mapView.annotations; 367 | // [self.mapView removeAnnotations:annos]; 368 | //} 369 | 370 | 371 | 372 | #pragma mark 提供两个点,路径规划 373 | -(void)moveWith:(MKMapItem *)source toDestination:(MKMapItem *)destination{ 374 | 375 | //创建请求体 376 | // 创建请求体 (起点与终点) 377 | MKDirectionsRequest *request = [[MKDirectionsRequest alloc] init]; 378 | 379 | request.source = source; 380 | request.destination = destination; 381 | 382 | self.directions = [[MKDirections alloc]initWithRequest:request]; 383 | 384 | // 计算路线规划信息 (向服务器发请求) 385 | [self.directions calculateDirectionsWithCompletionHandler:^(MKDirectionsResponse * _Nullable response, NSError * _Nullable error) { 386 | 387 | //获取到所有路线 388 | NSArray *routesArray = response.routes; 389 | //取出最后一条路线 390 | MKRoute *rute = routesArray.lastObject; 391 | 392 | //路线中的每一步 393 | NSArray *stepsArray = rute.steps; 394 | 395 | //遍历 396 | for (MKRouteStep *step in stepsArray) { 397 | 398 | [self.mapView addOverlay:step.polyline]; 399 | } 400 | 401 | }]; 402 | 403 | } 404 | 405 | // 返回指定的遮盖模型所对应的遮盖视图, renderer-渲染 406 | - (MKOverlayRenderer *)mapView:(MKMapView *)mapView rendererForOverlay:(id)overlay{ 407 | // 判断类型 408 | if ([overlay isKindOfClass:[MKPolyline class]]) { 409 | // 针对线段, 系统有提供好的遮盖视图 410 | MKPolylineRenderer *render = [[MKPolylineRenderer alloc] initWithPolyline:overlay]; 411 | 412 | // 配置,遮盖线的颜色 413 | render.lineWidth = 5; 414 | render.strokeColor = [UIColor lightGrayColor]; 415 | //[UIColor colorWithRed:arc4random_uniform(256) / 255.0 green:arc4random_uniform(256) / 255.0 blue:arc4random_uniform(256) / 255.0 alpha:1.0]; 416 | 417 | return render; 418 | } 419 | // 返回nil, 是没有默认效果 420 | return nil; 421 | } 422 | 423 | 424 | #pragma mark - 跳转第三方地图导航 425 | -(void)leftClick{ 426 | 427 | 428 | if (moreiOS8) { 429 | UIAlertController * alert = [UIAlertController alertControllerWithTitle:@"导航到设备" message:nil preferredStyle:UIAlertControllerStyleActionSheet]; 430 | //自带地图 431 | [alert addAction:[UIAlertAction actionWithTitle:@"自带地图" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { 432 | 433 | NSLog(@"alertController -- 自带地图"); 434 | 435 | //使用自带地图导航 436 | MKMapItem *currentLocation =[MKMapItem mapItemForCurrentLocation]; 437 | 438 | MKMapItem *toLocation = [[MKMapItem alloc] initWithPlacemark:[[MKPlacemark alloc] initWithCoordinate:CLLocationCoordinate2DMake(_latitude, _longitude) addressDictionary:nil]]; 439 | 440 | [MKMapItem openMapsWithItems:@[currentLocation,toLocation] launchOptions:@{MKLaunchOptionsDirectionsModeKey:MKLaunchOptionsDirectionsModeDriving, 441 | MKLaunchOptionsShowsTrafficKey:[NSNumber numberWithBool:YES]}]; 442 | 443 | 444 | }]]; 445 | 446 | //判断是否安装了高德地图,如果安装了高德地图,则使用高德地图导航 447 | if ( [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"iosamap://"]]) { 448 | 449 | [alert addAction:[UIAlertAction actionWithTitle:@"高德地图" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { 450 | 451 | NSLog(@"alertController -- 高德地图"); 452 | NSString *urlsting =[[NSString stringWithFormat:@"iosamap://navi?sourceApplication= &backScheme= &lat=%f&lon=%f&dev=0&style=2",_latitude,_longitude] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; 453 | [[UIApplication sharedApplication]openURL:[NSURL URLWithString:urlsting]]; 454 | 455 | }]]; 456 | } 457 | 458 | //判断是否安装了百度地图,如果安装了百度地图,则使用百度地图导航 459 | if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"baidumap://"]]) { 460 | [alert addAction:[UIAlertAction actionWithTitle:@"百度地图" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { 461 | 462 | NSLog(@"alertController -- 百度地图"); 463 | NSString *urlsting =[[NSString stringWithFormat:@"baidumap://map/direction?origin={{我的位置}}&destination=latlng:%f,%f|name=目的地&mode=driving&coord_type=gcj02",_latitude,_longitude] stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]; 464 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:urlsting]]; 465 | 466 | }]]; 467 | } 468 | 469 | //添加取消选项 470 | [alert addAction:[UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) { 471 | 472 | [alert dismissViewControllerAnimated:YES completion:nil]; 473 | 474 | }]]; 475 | 476 | //显示alertController 477 | [self presentViewController:alert animated:YES completion:nil]; 478 | 479 | 480 | } 481 | else { //系统版本低于8.0,则使用UIActionSheet 482 | 483 | UIActionSheet * actionsheet = [[UIActionSheet alloc] initWithTitle:@"导航到设备" delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:nil otherButtonTitles:@"自带地图", nil]; 484 | 485 | //如果安装高德地图,则添加高德地图选项 486 | if ( [[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"iosamap://"]]) { 487 | 488 | [actionsheet addButtonWithTitle:@"高德地图"]; 489 | 490 | } 491 | 492 | //如果安装百度地图,则添加百度地图选项 493 | if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"baidumap://"]]) { 494 | 495 | 496 | [actionsheet addButtonWithTitle:@"百度地图"]; 497 | } 498 | 499 | [actionsheet showInView:self.view]; 500 | 501 | } 502 | } 503 | 504 | #pragma mark - 开始规划路线 505 | -(void)click{ 506 | NSLog(@"开始规划路线"); 507 | 508 | // 地理反编码根据经纬度,获取位置信息 这个误差较大 509 | // CLLocation *loc = [[CLLocation alloc] initWithLatitude:_myLatitude longitude:_myLongitude]; 510 | // CLLocation *loc1 = [[CLLocation alloc] initWithLatitude:_latitude longitude:_longitude]; 511 | // 512 | // [self.geoC reverseGeocodeLocation:loc completionHandler:^(NSArray * _Nullable placemarks, NSError * _Nullable error) { 513 | // 514 | // MKMapItem *intrItem = [[MKMapItem alloc]initWithPlacemark:[[MKPlacemark alloc]initWithPlacemark:[placemarks lastObject]]]; 515 | // 516 | // // 让地图跳转到起点所在的区域 517 | // MKCoordinateRegion region = MKCoordinateRegionMake(intrItem.placemark.location.coordinate, MKCoordinateSpanMake(0.02, 0.02)); 518 | // 519 | // [self.mapView setRegion:region]; 520 | // 521 | // 522 | // [self.geoC reverseGeocodeLocation:loc1 completionHandler:^(NSArray * _Nullable placemarks, NSError * _Nullable error) { 523 | // 524 | // MKMapItem *destItem = [[MKMapItem alloc]initWithPlacemark:[[MKPlacemark alloc]initWithPlacemark:[placemarks lastObject]]]; 525 | // 526 | // //调用下面方法发送请求 527 | // [self moveWith:intrItem toDestination:destItem]; 528 | // 529 | // }]; 530 | // 531 | // }]; 532 | 533 | 534 | //根据位置名称转换经纬度 535 | [self.geoC geocodeAddressString:@"凯信国际广场" completionHandler:^(NSArray * _Nullable placemarks, NSError * _Nullable error) { 536 | 537 | MKMapItem *source = [[MKMapItem alloc]initWithPlacemark:[[MKPlacemark alloc]initWithPlacemark:[placemarks lastObject]]]; 538 | 539 | MKCoordinateRegion region = MKCoordinateRegionMake(source.placemark.location.coordinate, MKCoordinateSpanMake(0.02, 0.02)); 540 | 541 | [self.mapView setRegion:region]; 542 | 543 | [self.geoC geocodeAddressString:@"上海市浦东新区张江药谷大厦" completionHandler:^(NSArray * _Nullable placemarks, NSError * _Nullable error) { 544 | 545 | MKMapItem *destination = [[MKMapItem alloc]initWithPlacemark:[[MKPlacemark alloc]initWithPlacemark:[placemarks lastObject]]]; 546 | 547 | //调用下面方法发送请求 548 | [self moveWith:source toDestination:destination]; 549 | 550 | }]; 551 | }]; 552 | 553 | } 554 | 555 | 556 | - (void)didReceiveMemoryWarning { 557 | [super didReceiveMemoryWarning]; 558 | // Dispose of any resources that can be recreated. 559 | } 560 | 561 | 562 | @end 563 | -------------------------------------------------------------------------------- /systemmap/systemmap/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // systemmap 4 | // 5 | // Created by anan on 2017/7/6. 6 | // Copyright © 2017年 Plan. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /systemmap/systemmap/myAnnotation.h: -------------------------------------------------------------------------------- 1 | // 2 | // myAnnotationView.h 3 | // 系统高德地图 4 | // 5 | // Created by anan on 2017/7/5. 6 | // Copyright © 2017年 Plan. All rights reserved. 7 | // 8 | #import 9 | #import 10 | 11 | @interface myAnnotation : NSObject 12 | @property (nonatomic, assign) CLLocationCoordinate2D coordinate; 13 | @property (nonatomic, copy, nullable) NSString *title; 14 | @property (nonatomic, copy, nullable) NSString *subtitle; 15 | 16 | 17 | 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /systemmap/systemmap/myAnnotation.m: -------------------------------------------------------------------------------- 1 | // 2 | // myAnnotationView.m 3 | // 系统高德地图 4 | // 5 | // Created by anan on 2017/7/5. 6 | // Copyright © 2017年 Plan. All rights reserved. 7 | // 8 | 9 | #import "myAnnotation.h" 10 | 11 | @implementation myAnnotation 12 | 13 | /* 14 | // Only override drawRect: if you perform custom drawing. 15 | // An empty implementation adversely affects performance during animation. 16 | - (void)drawRect:(CGRect)rect { 17 | // Drawing code 18 | } 19 | */ 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /systemmap/systemmapTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /systemmap/systemmapTests/systemmapTests.m: -------------------------------------------------------------------------------- 1 | // 2 | // systemmapTests.m 3 | // systemmapTests 4 | // 5 | // Created by anan on 2017/7/6. 6 | // Copyright © 2017年 Plan. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface systemmapTests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation systemmapTests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | - (void)tearDown { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | [super tearDown]; 25 | } 26 | 27 | - (void)testExample { 28 | // This is an example of a functional test case. 29 | // Use XCTAssert and related functions to verify your tests produce the correct results. 30 | } 31 | 32 | - (void)testPerformanceExample { 33 | // This is an example of a performance test case. 34 | [self measureBlock:^{ 35 | // Put the code you want to measure the time of here. 36 | }]; 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /systemmap/systemmapUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /systemmap/systemmapUITests/systemmapUITests.m: -------------------------------------------------------------------------------- 1 | // 2 | // systemmapUITests.m 3 | // systemmapUITests 4 | // 5 | // Created by anan on 2017/7/6. 6 | // Copyright © 2017年 Plan. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface systemmapUITests : XCTestCase 12 | 13 | @end 14 | 15 | @implementation systemmapUITests 16 | 17 | - (void)setUp { 18 | [super setUp]; 19 | 20 | // Put setup code here. This method is called before the invocation of each test method in the class. 21 | 22 | // In UI tests it is usually best to stop immediately when a failure occurs. 23 | self.continueAfterFailure = NO; 24 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 25 | [[[XCUIApplication alloc] init] launch]; 26 | 27 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 28 | } 29 | 30 | - (void)tearDown { 31 | // Put teardown code here. This method is called after the invocation of each test method in the class. 32 | [super tearDown]; 33 | } 34 | 35 | - (void)testExample { 36 | // Use recording to get started writing UI tests. 37 | // Use XCTAssert and related functions to verify your tests produce the correct results. 38 | } 39 | 40 | @end 41 | --------------------------------------------------------------------------------