새로운 지도 스타일이 곧 Google Maps Platform에 제공될 예정입니다. 이 지도 스타일 지정 업데이트에는 새로운 기본 색상 팔레트와 지도 환경 및 사용성 개선사항이 포함됩니다. 모든 지도 스타일이 2025년 3월에 자동으로 업데이트됩니다. 사용 가능 여부 및 더 일찍 선택하는 방법에 대한 자세한 내용은 Google Maps Platform용 새로운 지도 스타일을 참고하세요.
터미널 창을 열고 샘플 파일을 클론한 디렉터리로 이동한 다음 GoogleMaps 디렉터리로 드릴다운합니다.
Swift
cd maps-sdk-for-ios-samples-main/GoogleMaps-Swift
pod installopen GoogleMapsSwiftDemos.xcworkspace
Objective-C
cd maps-sdk-for-ios-samples-main/GoogleMaps
pod installopen GoogleMapsDemos.xcworkspace
Xcode에서 컴파일 버튼을 눌러 현재 스키마로 앱을 빌드합니다. 빌드 오류가 발생하여 Swift의 경우 SDKConstants.swift 파일에, Objective-C의 경우 SDKDemoAPIKey.h 파일에 API 키를 입력하라는 메시지가 표시됩니다.
아직 API 키가 없는 경우 안내에 따라 Google Cloud 콘솔에서 프로젝트를 설정하고 API 키를 가져옵니다. Cloud 콘솔에서 키를 구성할 때 샘플 앱의 번들 식별자로 키를 제한하여 앱에서만 키를 사용할 수 있도록 할 수 있습니다. SDK 샘플 앱의 기본 번들 식별자는 com.example.GoogleMapsDemos입니다.
Swift의 경우 SDKConstants.swift 파일을 수정하고 Objective-C의 경우 SDKDemoAPIKey.h 파일을 수정한 후 apiKey 또는 kAPIKey 상수의 정의에 API 키를 붙여넣습니다. 예를 들면 다음과 같습니다.
Swift
staticletapiKey="YOUR_API_KEY"
Objective-C
staticNSString*constkAPIKey=@"YOUR_API_KEY";
SDKConstants.swift 파일 (Swift) 또는 SDKDemoAPIKey.h 파일 (Objective-C)에서 다음 줄을 삭제합니다. 이 줄은 사용자 정의 문제를 등록하는 데 사용됩니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-03-11(UTC)"],[[["The Maps SDK for iOS provides a sample app with code examples showcasing key features, serving as a starting point for your iOS app development."],["You can find a comprehensive list of samples in the GitHub repository and easily access specific feature implementations through provided links."],["To run the full sample app locally, clone the repository, install dependencies using CocoaPods, and build the project in Xcode after configuring your API key."],["Troubleshooting steps are available if you encounter issues like not seeing a map after successfully running the app, guiding you to add your API key correctly."]]],["The provided content focuses on using the Maps SDK for iOS. Key actions include cloning the sample app repository from GitHub, building the app in Xcode, and integrating an API key. The API key is obtained from the Google Cloud console. After entering the API key, you can build and run the project. You then can interact with the various features demonstrated, like displaying a basic map, adding markers, drawing shapes, enabling location, and handling events. Finally, the content mentions the necessity to grant the app location access.\n"]]