### Basic Map Setup Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/index.md Demonstrates the basic setup for displaying a map, including SDK initialization and camera configuration. ```APIDOC ## Basic Map Setup ### Description This example shows how to set up a basic map view in your iOS application. It includes initializing the SDK and configuring the initial camera position. ### Code Example ```swift import KakaoMapsSDK class MapViewController: UIViewController { @IBOutlet weak var mapView: UIView! // Assuming mapView is connected via Interface Builder var kakaoMap: KakaoMap? // Instance to manage the map override func viewDidLoad() { super.viewDidLoad() // Initialize SDK let initializer = SDKInitializer() initializer.InitSDK(appKey: "YOUR_APP_KEY", phase: "production") // Configure the map camera // This assumes 'kakaoMap' is already initialized and associated with a view. // In a real scenario, you would typically create or retrieve the KakaoMap instance. kakaoMap?.moveCamera( CameraUpdate( position: CameraPosition( target: MapPoint(longitude: 127.1086, latitude: 37.4216), // Example coordinates for Seoul zoomLevel: 15 ) ) ) } } ``` ### Notes - Ensure that the `mapView` is properly connected from your Interface Builder or created programmatically. - The `KakaoMap` instance needs to be properly initialized and managed before calling methods like `moveCamera`. ``` -------------------------------- ### Basic Map Setup in Swift Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/index.md Initializes the Kakao Maps SDK and configures the map view. Ensure you replace 'YOUR_APP_KEY' with your actual application key. This setup is typically performed in a UIViewController. ```swift import KakaoMapsSDK class MapViewController: UIViewController { @IBOutlet weak var mapView: UIView! var kakaoMap: KakaoMap? override func viewDidLoad() { super.viewDidLoad() // Initialize SDK let initializer = SDKInitializer() initializer.InitSDK(appKey: "YOUR_APP_KEY", phase: "production") // Create map (typically done via Interface Builder or programmatically) // Then configure it: kakaoMap?.moveCamera( CameraUpdate( position: CameraPosition( target: MapPoint(longitude: 127.1086, latitude: 37.4216), zoomLevel: 15 ) ) ) } } ``` -------------------------------- ### start Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/Animator.md Starts the animation. ```APIDOC ## start ### Description Starts the animation. ### Method start ### Parameters None ### Response None ``` -------------------------------- ### Sample Test Setup for Kakao Map SDK Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/GUIDE.md A sample XCTest setup for Kakao Map SDK. It demonstrates initializing the SDK with a test key and verifying the creation of map points and POI layers. ```swift import XCTest import KakaoMapsSDK class MapTests: XCTestCase { var kakaoMap: KakaoMap? override func setUp() { super.setUp() let initializer = SDKInitializer() initializer.InitSDK(appKey: "TEST_KEY", phase: "development") } func testLocationDisplay() { let position = MapPoint(longitude: 127.1086, latitude: 37.4216) XCTAssertNotNil(position) } func testLayerCreation() { guard let poiLayer = kakaoMap?.addPoiLayer(layerID: "test") else { XCTFail("Failed to create POI layer") return } XCTAssertNotNil(poiLayer) } } ``` -------------------------------- ### Handle Camera Movement Start Events Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/KakaoMap.md Registers a callback function that is triggered just before the map's camera starts moving. It provides parameters related to the camera action. ```swift func addCameraWillMovedEventHandler(target: NSObject?, handler: @escaping (CameraActionEventParam) -> Void) -> DisposableEventHandler? ``` -------------------------------- ### Safe Map Setup with Error Handling Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/GUIDE.md Implement a function to safely initialize the SDK, create POI layers, add POIs, and verify their display, checking for critical failures at each step. ```swift func safeMapSetup() -> Bool { let initializer = SDKInitializer() guard !apiKey.isEmpty else { print("ERROR: API key not configured") return false } initializer.InitSDK(appKey: apiKey, phase: "production") guard let poiLayer = kakaoMap.addPoiLayer(layerID: "main") else { print("ERROR: Failed to create POI layer") return false } let poi = Poi() poi.position = MapPoint(longitude: 127.1086, latitude: 37.4216) poiLayer.addPoi(poi) guard poi.isShow else { print("ERROR: Failed to display POI") return false } return true } ``` -------------------------------- ### Get Zone Manager Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/KakaoMap.md Retrieves the zone manager. ```swift func getZoneManager() -> ZoneManager? ``` -------------------------------- ### Get Label Manager Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/KakaoMap.md Retrieves the label manager. ```swift func getLabelManager() -> LabelManager? ``` -------------------------------- ### Start Animation Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/Animator.md Initiates the animation sequence. Call this method to begin the animation controlled by the animator. ```swift start() ``` -------------------------------- ### Get Shape Manager Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/KakaoMap.md Retrieves the shape manager. ```swift func getShapeManager() -> ShapeManager? ``` -------------------------------- ### KakaoMap Class Reference Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/SUMMARY.txt Detailed documentation for the KakaoMap class, including its methods, properties, and usage examples. ```APIDOC ## KakaoMap Class ### Description Provides the core functionality for displaying and interacting with a Kakao Map within your application. This class allows for map initialization, camera control, layer management, and event handling. ### Methods #### `init(frame: MapInitOptions)` Initializes a new instance of the KakaoMap. - **frame** (CGRect) - The frame for the map view. - **options** (MapInitOptions) - Options for initializing the map, such as map type and initial camera position. #### `setCamera(cameraUpdate: CameraUpdate, animated: Bool)` Updates the map's camera position and zoom level. - **cameraUpdate** (CameraUpdate) - Defines the target camera position and zoom. - **animated** (Bool) - Whether the camera movement should be animated. #### `addLayer(layer: MapLayer)` Adds a map layer to the map. - **layer** (MapLayer) - The map layer to add (e.g., PoiLayer, TileLayer). ### Events #### `didTapMap(point: MapPoint)` Called when the map is tapped. - **point** (MapPoint) - The geographic coordinate of the tap. #### `didMoveMap(cameraPosition: CameraPosition)` Called when the map's camera position changes. - **cameraPosition** (CameraPosition) - The current camera position and zoom level. ``` -------------------------------- ### InfoWindow rawPosition Method Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/InfoWindow.md Gets the raw position of the InfoWindow. ```swift rawPosition() ``` -------------------------------- ### Get Configured SDK Phase Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/SDKInitializer.md Retrieves the SDK phase (production or development) that was used during initialization. Returns nil if the SDK has not been initialized. ```swift let initializer = SDKInitializer() initializer.InitSDK(appKey: "abc123xyz", phase: "development") if let phase = initializer.GetPhase() { print("Running in phase: \(phase)") } ``` -------------------------------- ### Get GUI Manager Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/KakaoMap.md Retrieves the GUI manager for managing GUI components. ```swift func getGuiManager() -> GuiManager? ``` -------------------------------- ### Handle Map Camera and Interaction Events Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/index.md Provides examples for handling various map-related events, including camera movements (willMove, stopped) and user interactions like map taps and focus changes. These handlers allow for dynamic responses to map state changes. ```swift // Camera events kakaoMap.addCameraWillMovedEventHandler(target: self) { event in print("Camera will move") } kakaoMap.addCameraStoppedEventHandler(target: self) { event in print("Camera stopped at: \(event.cameraPosition)") } // Interaction events kakaoMap.addMapTappedEventHandler(target: self) { point in print("Map tapped: \(point)") } // Focus events kakaoMap.addFocusChangedEventHandler(target: self) { event in if event.isFocused { print("Map gained focus") } } ``` -------------------------------- ### Get All Wave Texts from LabelLayer Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/LabelLayer.md Retrieves all wave text elements currently managed by the LabelLayer. ```swift getAllWaveTexts() ``` -------------------------------- ### Get Configured App Key Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/SDKInitializer.md Retrieves the application API key that was used to initialize the SDK. Returns nil if the SDK has not been initialized. ```swift let initializer = SDKInitializer() initializer.InitSDK(appKey: "abc123xyz", phase: "production") if let currentKey = initializer.GetAppKey() { print("Initialized with key: \(currentKey)") } ``` -------------------------------- ### Initialize SDK and Handle Errors Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/errors.md Demonstrates how to initialize the SDK and catch potential initialization errors using a do-catch block. Ensure the app key and phase are correctly provided. ```swift do { let initializer = SDKInitializer() initializer.InitSDK(appKey: "app_key", phase: "production") } catch { print("SDK initialization failed: \(error)") } ``` -------------------------------- ### Get Current Map View Info Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/KakaoMap.md Gets current map view information, including visible area bounds. ```swift func getCurrentMapviewInfo() -> MapviewInfo? ``` -------------------------------- ### Initialize for Different Environments Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/SDKInitializer.md Shows how to use conditional compilation (`#if DEBUG`) to set different API keys and phases for development and production environments. ```swift let apiKey: String let phase: String #if DEBUG apiKey = "DEVELOPMENT_API_KEY" phase = "development" #else apiKey = "PRODUCTION_API_KEY" phase = "production" #endif let initializer = SDKInitializer() initializer.InitSDK(appKey: apiKey, phase: phase) ``` -------------------------------- ### Get Map Height at Specific Level Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/KakaoMap.md Gets the map height in points at a specific zoom level. The zoom level typically ranges from 1 to 28. ```swift func heightAtLevel(_ level: Int) -> CGFloat ``` -------------------------------- ### SDK Initialization with Error Handling Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/SDKInitializer.md Provides a function to initialize the SDK, including checks for an empty app key and verification of successful initialization by retrieving the app key. ```swift func initializeSDK(appKey: String) -> Bool { let initializer = SDKInitializer() guard !appKey.isEmpty else { print("ERROR: App key cannot be empty") return false } initializer.InitSDK(appKey: appKey, phase: "production") guard let verifyKey = initializer.GetAppKey() else { print("ERROR: SDK initialization failed") return false } print("SDK initialized successfully") return true } ``` -------------------------------- ### Create MapPoint Instances Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/MapPoint.md Demonstrates various ways to create MapPoint objects, including explicit creation, defining multiple points for routes, and converting from a CLLocation object. ```swift // Explicit coordinate creation let destination = MapPoint(longitude: 127.0687, latitude: 37.4979) // Multiple points for a route let waypoints = [ MapPoint(longitude: 127.1, latitude: 37.4), MapPoint(longitude: 127.11, latitude: 37.41), MapPoint(longitude: 127.12, latitude: 37.42) ] // From user location (CLLocation) // Assuming locationManager.location is available // let userPoint = MapPoint( // longitude: location.coordinate.longitude, // latitude: location.coordinate.latitude // ) ``` -------------------------------- ### InfoWindow Constructors Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/InfoWindow.md Initializes a new instance of the InfoWindow. ```APIDOC ## init(_:) ### Description Initializes a new instance of the type. ### Method init ### Parameters * **_**: (Type not specified) - Description not specified ``` -------------------------------- ### Get Route Manager Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/KakaoMap.md Retrieves the route manager. ```swift func getRouteManager() -> RouteManager? ``` -------------------------------- ### Get Tracking Manager Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/KakaoMap.md Retrieves the tracking manager. ```swift func getTrackingManager() -> TrackingManager? ``` -------------------------------- ### Initialize Kakao Map SDK Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/GUIDE.md Initialize the SDK with your API key and set the phase to production. Ensure you have registered and obtained your REST API Key from the Kakao Developers website. ```swift let initializer = SDKInitializer() initializer.InitSDK(appKey: "YOUR_API_KEY", phase: "production") ``` -------------------------------- ### Create and Display a POI with Event Handling Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/Poi.md Demonstrates the typical workflow for creating a POI, adding it to a layer, customizing it with a badge, and setting up a tap event handler. Ensure POIs are added to a layer for efficient rendering. ```swift // Create POI layer guard let poiLayer = kakaoMap.addPoiLayer(layerID: "restaurants") else { return } // Create POI let poi = Poi() poi.position = MapPoint(longitude: 127.1086, latitude: 37.4216) poi.itemID = 1001 poi.clickable = true // Add to layer and show poiLayer.addPoi(poi) poi.show() // Add badge let badge = PoiBadge(badgeID: "rating", image: UIImage(named: "rating5")) poi.addBadge(badge) // Handle tap poi.addPoiTappedEventHandler(target: self) { print("Restaurant tapped") } ``` -------------------------------- ### AppDelegate Initialization Pattern Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/SDKInitializer.md Demonstrates the recommended pattern for initializing the Kakao Maps SDK early in the application lifecycle within the AppDelegate. ```swift import UIKit import KakaoMapsSDK @main class AppDelegate: UIResponder, UIApplicationDelegate { func application( _ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? ) -> Bool { // Initialize SDK on app launch let initializer = SDKInitializer() let apiKey = "YOUR_API_KEY_FROM_KAKAO_DEVELOPERS" initializer.InitSDK(appKey: apiKey, phase: "production") return true } } ``` -------------------------------- ### heightAtLevel Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/KakaoMap.md Gets the map height in points at a specific zoom level. ```APIDOC ## heightAtLevel ### Description Gets the map height at a specific zoom level. ### Parameters #### Path Parameters - **level** (Int) - Required - Zoom level (1-28) ### Returns Height in points ``` -------------------------------- ### Secure API Key Loading Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/SDKInitializer.md Illustrates how to securely load API keys from configuration files instead of hardcoding them directly in the source code. ```swift // ✗ DON'T - Hardcoded key let apiKey = "abc123xyz456" // ✓ DO - Load from configuration let apiKey = Bundle.main.infoDictionary?["KAKAO_API_KEY"] as? String ?? "" ``` -------------------------------- ### Create SDKInitializer Instance Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/SDKInitializer.md Creates a new SDKInitializer instance. This is a prerequisite for initializing the SDK. ```swift let initializer = SDKInitializer() initializer.InitSDK(appKey: "YOUR_APP_KEY", phase: "production") ``` -------------------------------- ### SDKInitializer Class Reference Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/SUMMARY.txt Details on how to initialize the Kakao Map SDK using the SDKInitializer. ```APIDOC ## SDKInitializer Class ### Description Handles the initialization of the Kakao Map SDK, including setting up API keys and configuration options required before using any map functionalities. ### Methods #### `initialize(apiKey: String, options: SDKOptions)` Initializes the Kakao Map SDK with the provided API key and options. - **apiKey** (String) - Your unique Kakao API key. - **options** (SDKOptions) - Configuration options for the SDK, such as logging levels and service terms acceptance. ``` -------------------------------- ### Get All Polyline Shapes Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/ShapeLayer.md Retrieves all polyline shapes currently managed by the ShapeLayer. ```swift getAllPolylineShapes() ``` -------------------------------- ### Get Polyline Shape Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/ShapeLayer.md Retrieves a specific polyline shape from the layer by its ID. ```swift getPolylineShape(shapeID:) ``` -------------------------------- ### Initialize Kakao Maps SDK Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/configuration.md Initialize the SDK with your application key and specify the desired phase (e.g., development or production). ```swift let initializer = SDKInitializer() initializer.InitSDK(appKey: "your_app_key", phase: "phase") ``` -------------------------------- ### Get All Polygon Shapes Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/ShapeLayer.md Retrieves all polygon shapes currently managed by the ShapeLayer. ```swift getAllPolygonShapes() ``` -------------------------------- ### GuiManager Constructors Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/GuiManager.md Initializes a new instance of the GuiManager. ```APIDOC ## init() ### Description Initializes a new instance of the GuiManager. ### Method init() ### Parameters None ### Response None ``` -------------------------------- ### Get Polygon Shape Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/ShapeLayer.md Retrieves a specific polygon shape from the layer by its ID. ```swift getPolygonShape(shapeID:) ``` -------------------------------- ### GuiImage Constructors and Methods Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/GuiImage.md This snippet details the initialization and methods available for the GuiImage class. ```APIDOC ## GuiImage **Module:** `KakaoMapsSDK` Image GUI element for displaying images. ### Constructors #### init(_:) ```swift init(_:) ``` Initializes a new instance of the type. ### Methods #### getChild ```swift getChild(_:) ``` Method: getChild ### Properties | Property | Type | Description | |----------|------|-------------| | `image` | image | Property | | `imageSize` | imageSize | Property | | `imageStretch` | imageStretch | Property | | `child` | child | Property | ``` -------------------------------- ### Animator Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/types.md Manages animations, providing properties for ID, start state, and available methods. ```APIDOC ## Animator ### Description Controls and manages the lifecycle and state of animations. ### Properties - **animatorID** (animatorID): A unique identifier for the animator. - **isStart** (isStart): A boolean indicating if the animation has started. ### Methods - 3 methods available for controlling animations. ``` -------------------------------- ### SDK Initialization Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/index.md Initializes the Kakao Maps SDK with your application key and sets the operating phase. ```APIDOC ## SDK Initialization ### Description Initializes the Kakao Maps SDK with your application key and sets the operating phase. This is a required step before using any other SDK features. ### Method `InitSDK(appKey: String, phase: String)` ### Parameters - **appKey** (String) - Required - Your unique application key obtained from the Kakao Developers console. - **phase** (String) - Required - The operating phase, typically "production" or "development". ### Request Example ```swift let initializer = SDKInitializer() initializer.InitSDK(appKey: "YOUR_APP_KEY", phase: "production") ``` ### Response This method does not return a value. Initialization is confirmed by the absence of errors during subsequent SDK operations. ``` -------------------------------- ### getCurrentMapviewInfo Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/KakaoMap.md Gets current map view information including visible area bounds. ```APIDOC ## getCurrentMapviewInfo ### Description Gets current map view information including visible area bounds. ### Returns MapviewInfo with viewport data ``` -------------------------------- ### PoiAnimator Initialization Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/PoiAnimator.md Initializes a new instance of the PoiAnimator. ```APIDOC ## init() ### Description Initializes a new instance of the PoiAnimator. ### Method init() ### Endpoint N/A (Constructor) ### Parameters None ### Request Example N/A ### Response N/A ``` -------------------------------- ### Initialize Polyline with Line and Style Index Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/Polyline.md Initializes a new Polyline instance specifying the line and style index. ```swift init(line:styleIndex:) ``` -------------------------------- ### Get Map Coordinate Converter Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/KakaoMap.md Retrieves the coordinate converter utility for map transformations. ```swift func getMapCoordConverter() -> MapCoordConverter? ``` -------------------------------- ### GuiAnimatedImage Constructors Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/GuiAnimatedImage.md Provides information on how to initialize a GuiAnimatedImage instance. ```APIDOC ## init(_:) ### Description Initializes a new instance of the GuiAnimatedImage type. ### Method init ### Parameters * **_**: (Type not specified) - Description not specified. ``` -------------------------------- ### Get Multiple Polyline Shapes Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/ShapeLayer.md Retrieves multiple polyline shapes from the layer by their IDs. ```swift getPolylineShapes(shapeIDs:) ``` -------------------------------- ### Get Multiple Polygon Shapes Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/ShapeLayer.md Retrieves multiple polygon shapes from the layer by their IDs. ```swift getPolygonShapes(shapeIDs:) ``` -------------------------------- ### GuiButton Initialization Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/GuiButton.md Initializes a new instance of the GuiButton class. ```APIDOC ## init(_:) ### Description Initializes a new instance of the GuiButton type. ### Method `init(_:)` ### Parameters * **_** (Any) - Description of the parameter if available, otherwise omit. ### Response Initializes a GuiButton instance. ``` -------------------------------- ### GuiText Initialization Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/GuiText.md Initializes a new instance of the GuiText type. ```APIDOC ## init(_:) ### Description Initializes a new instance of the GuiText type. ### Method init(_:) ### Parameters None explicitly documented beyond the initializer signature. ``` -------------------------------- ### Get All POIs from LabelLayer Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/LabelLayer.md Retrieves all Points of Interest (POIs) currently managed by the LabelLayer. ```swift getAllPois() ``` -------------------------------- ### Initialize InfoWindowAnimator Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/InfoWindowAnimator.md Initializes a new instance of the InfoWindowAnimator. This is the basic constructor for the class. ```swift init() ``` -------------------------------- ### Get All Map Polyline Shapes Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/ShapeLayer.md Retrieves all map polyline shapes currently managed by the ShapeLayer. ```swift getAllMapPolylineShapes() ``` -------------------------------- ### PoiBadge Constructors Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/PoiBadge.md Provides details on how to initialize a PoiBadge instance. ```APIDOC ## init(badgeID:image:offset:zOrder:) ### Description Initializes a new instance of the PoiBadge type with specified badge ID, image, offset, and zOrder. ### Method init ### Parameters #### Path Parameters - **badgeID** (badgeID) - Description - **image** (image) - Description - **offset** (offset) - Description - **zOrder** (zOrder) - Description ## init() ### Description Initializes a new instance of the PoiBadge type with default values. ### Method init ``` -------------------------------- ### PoiBadge Initializer with Parameters Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/PoiBadge.md Initializes a new PoiBadge instance with a specific badge ID, image, offset, and z-order. ```swift init(badgeID:image:offset:zOrder:) ``` -------------------------------- ### Get Map Polyline Shape Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/ShapeLayer.md Retrieves a specific map polyline shape from the layer by its ID. ```swift getMapPolylineShape(shapeID:) ``` -------------------------------- ### Get All Map Polygon Shapes Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/ShapeLayer.md Retrieves all map polygon shapes currently managed by the ShapeLayer. ```swift getAllMapPolygonShapes() ``` -------------------------------- ### InfoWindow Methods Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/InfoWindow.md Provides details on the available methods for interacting with InfoWindow instances. ```APIDOC ## showWithAutoMove(callback:) ### Description Displays the InfoWindow with an automatic map movement. ### Method showWithAutoMove ### Parameters * **callback**: (Type not specified) - Description not specified ``` ```APIDOC ## getChild(_:) ### Description Retrieves a child element associated with the InfoWindow. ### Method getChild ### Parameters * **_**: (Type not specified) - Description not specified ``` ```APIDOC ## moveAt(_:duration:) ### Description Moves the InfoWindow to a specified position over a duration. ### Method moveAt ### Parameters * **_**: (Type not specified) - Description not specified * **duration**: (Type not specified) - Description not specified ``` ```APIDOC ## rawPosition() ### Description Gets the raw position of the InfoWindow. ### Method rawPosition ### Returns * (Type not specified) - Description not specified ``` -------------------------------- ### Get Map Polygon Shape Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/ShapeLayer.md Retrieves a specific map polygon shape from the layer by its ID. ```swift getMapPolygonShape(shapeID:) ``` -------------------------------- ### GuiLayout Constructors Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/GuiLayout.md Provides documentation for the constructors available for the GuiLayout class. ```APIDOC ## init(_:) ### Description Initializes a new instance of the type. ### Method `init(_:)` ### Parameters None explicitly documented beyond the type signature. ``` ```APIDOC ## init(_:arrangement:) ### Description Initializes a new instance of the type with a specified arrangement. ### Method `init(_:arrangement:)` ### Parameters * **arrangement** (arrangement) - Description of the arrangement parameter. ``` -------------------------------- ### Polyline Constructors Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/Polyline.md Provides information on how to initialize a Polyline object. ```APIDOC ## init(line:styleIndex:) ### Description Initializes a new instance of the type. ### Signature ```swift init(line:styleIndex:) ``` ``` ```APIDOC ## init() ### Description Initializes a new instance of the type. ### Signature ```swift init() ``` ``` -------------------------------- ### Get Multiple Map Polyline Shapes Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/ShapeLayer.md Retrieves multiple map polyline shapes from the layer by their IDs. ```swift getMapPolylineShapes(shapeIDs:) ``` -------------------------------- ### Get Multiple Map Polygon Shapes Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/ShapeLayer.md Retrieves multiple map polygon shapes from the layer by their IDs. ```swift getMapPolygonShapes(shapeIDs:) ``` -------------------------------- ### Get Single POI from LabelLayer Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/LabelLayer.md Retrieves a specific Point of Interest (POI) from the LabelLayer using its ID. ```swift getPoi(poiID:) ``` -------------------------------- ### InitSDK Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/SDKInitializer.md Initializes the Kakao Maps SDK with your application's API key and specifies the SDK phase (e.g., 'production' or 'development'). This is a crucial step before utilizing any map features. ```APIDOC ## InitSDK ### Description Initializes the Kakao Maps SDK with your credentials. This method must be called before using any map functionality. ### Method ```swift func InitSDK(appKey: String, phase: String) -> Void ``` ### Parameters #### Path Parameters - **appKey** (String) - Required - Your Kakao Developers application API key. - **phase** (String) - Optional - SDK phase, either "production" or "development". Defaults to "production". ### Request Example ```swift // Basic initialization let initializer = SDKInitializer() initializer.InitSDK(appKey: "YOUR_APP_KEY", phase: "production") // Development phase initializer.InitSDK(appKey: "YOUR_DEV_KEY", phase: "development") ``` ``` -------------------------------- ### Initialize GuiButton Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/GuiButton.md Initializes a new instance of the GuiButton. This is the primary way to create a GuiButton object. ```swift init(_:) ``` -------------------------------- ### Get InfoWindow Animator Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/GuiManager.md Retrieves an InfoWindow animator by its ID. Use this to access or modify an existing animator. ```swift getInfoWindowAnimator(animatorID:) ``` -------------------------------- ### Polygon Constructors Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/Polygon.md Provides documentation for the different ways to initialize a Polygon object. ```APIDOC ## init(exteriorRing:holes:styleIndex:) ### Description Initializes a new instance of the Polygon type with an exterior ring, holes, and a style index. ### Parameters #### Path Parameters - **exteriorRing** (exteriorRing) - Required - Description of the exterior ring. - **holes** (holes) - Required - Description of the holes. - **styleIndex** (styleIndex) - Required - Description of the style index. ### Response #### Success Response (200) - **Polygon** (Polygon) - A new instance of the Polygon type. ``` ```APIDOC ## init(exteriorRing:hole:styleIndex:) ### Description Initializes a new instance of the Polygon type with an exterior ring, a single hole, and a style index. ### Parameters #### Path Parameters - **exteriorRing** (exteriorRing) - Required - Description of the exterior ring. - **hole** (hole) - Required - Description of the hole. - **styleIndex** (styleIndex) - Required - Description of the style index. ### Response #### Success Response (200) - **Polygon** (Polygon) - A new instance of the Polygon type. ``` ```APIDOC ## init() ### Description Initializes a new instance of the Polygon type with default values. ### Response #### Success Response (200) - **Polygon** (Polygon) - A new instance of the Polygon type. ``` -------------------------------- ### POI Constructors Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/Poi.md Provides documentation for creating and initializing Poi objects. ```APIDOC ## init ### Description Creates a new POI instance. ### Method init() ### Parameters None ### Request Example ```swift let poi = Poi() poi.position = MapPoint(longitude: 127.1086, latitude: 37.4216) ``` ### Response #### Success Response - **poi** (Poi) - A new Poi instance. ``` -------------------------------- ### WaveAnimationData Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/types.md Data structure for wave animations, defining properties like start and end alpha, radius, and level. ```APIDOC ## WaveAnimationData ### Description Data structure for wave animations, defining properties like start and end alpha, radius, and level. ### Properties - **startAlpha** (startAlpha) - **endAlpha** (endAlpha) - **startRadius** (startRadius) - **endRadius** (endRadius) - **level** (level) ### Constructors - `init(startAlpha:endAlpha:startRadius:endRadius:level:) - `init()` ``` -------------------------------- ### Initialize GuiLayout with Arrangement Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/GuiLayout.md Initializes a new instance of GuiLayout with a specified arrangement. Use this constructor to define how child components are organized within the layout. ```swift init(_:arrangement:) ``` -------------------------------- ### ProgressAnimationEffect Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/types.md Defines an animation effect for progress, specifying start and end points, direction, type, and other animation properties. ```APIDOC ## ProgressAnimationEffect ### Description Defines an animation effect for progress. ### Properties - **startPoint** (startPoint) - Description not available - **endPoint** (endPoint) - Description not available - **direction** (direction) - Description not available - **type** (type) - Description not available - **interpolation** (interpolation) - Description not available - **hideAtStop** (hideAtStop) - Description not available - **resetToInitialState** (resetToInitialState) - Description not available ### Constructors - `init(direction:type:)` - `init()` ``` -------------------------------- ### Get Supported Map Languages Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/KakaoMap.md Retrieves a list of language codes for which map labels are supported. This is useful for internationalization. ```swift func getSupportedLanguages() -> [String]? ``` -------------------------------- ### show Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/GuiBase.md Shows the GUI element on the map. ```APIDOC ## show ### Description Shows the element on the map. ### Method ```swift show() ``` ``` -------------------------------- ### LabelLayer Constructors Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/LabelLayer.md Initializes a new instance of the LabelLayer. ```APIDOC ## init() ### Description Initializes a new instance of the LabelLayer. ### Method init() ### Endpoint N/A (Constructor) ### Parameters None ### Request Example None ### Response None ``` -------------------------------- ### Get Single Wave Text from LabelLayer Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/LabelLayer.md Retrieves a specific wave text element from the LabelLayer using its ID. ```swift getWaveText(waveTextID:) ``` -------------------------------- ### Get Multiple POIs from LabelLayer Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/LabelLayer.md Retrieves multiple Points of Interest (POIs) from the LabelLayer using an array of their IDs. ```swift getPois(poiIDs:) ``` -------------------------------- ### Show GUI Element Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/GuiBase.md Use the `show()` method to make a GUI element visible on the map. This is a fundamental operation for displaying interactive map components. ```swift show() ``` -------------------------------- ### Get Child Element Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/GuiImage.md Retrieves a child element associated with the GuiImage. This method is used to access nested components. ```swift getChild(_:) ``` -------------------------------- ### Configure Map Display Options Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/GUIDE.md Set zoom levels, interaction behaviors like clickability and scrollability, and POI interaction for the map. ```swift // Zoom levels kakaoMap.minLevel = 1 // World view kakaoMap.maxLevel = 28 // Street detail // Interaction kakaoMap.isClickable = true // Allow map taps kakaoMap.isScrollable = true // Allow panning kakaoMap.isZoomable = true // Allow pinch zoom kakaoMap.isRotatable = false // Disable rotation kakaoMap.isTiltable = false // Disable tilt // POIs kakaoMap.poiClickable = true // POI taps enabled ``` -------------------------------- ### Get Multiple Wave Texts from LabelLayer Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/LabelLayer.md Retrieves multiple wave text elements from the LabelLayer using an array of their IDs. ```swift getWaveTexts(waveTextIDs:) ``` -------------------------------- ### Get Text Style Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/GuiText.md Retrieves the style of a text element at a given index. This allows inspection of how a text element is rendered. ```swift textStyle(index:) ``` -------------------------------- ### Create POI Layer and Handle Errors Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/README.md Safely add a POI layer, checking for creation success. Also demonstrates checking for an empty app key. ```swift guard let poiLayer = kakaoMap.addPoiLayer(layerID: "main") else { print("ERROR: Failed to create POI layer") return } ``` ```swift guard !appKey.isEmpty else { print("ERROR: App key not configured") return } ``` -------------------------------- ### Get Text Element Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/GuiText.md Retrieves a text element by its index. Use this to access and potentially display specific text elements. ```swift text(index:) ``` -------------------------------- ### CameraPosition Constructors Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/CameraPosition.md Initializes a new instance of CameraPosition with specified parameters. ```APIDOC ## init(target:height:rotation:tilt:) ### Description Initializes a new instance of the CameraPosition type with a target point, height, rotation, and tilt. ### Method init ### Parameters #### Path Parameters - **target** (targetPoint) - Required - The target point for the camera. - **height** (height) - Required - The height of the camera. - **rotation** (rotation) - Required - The rotation of the camera. - **tilt** (tilt) - Required - The tilt angle of the camera. ## init(target:zoomLevel:rotation:tilt:) ### Description Initializes a new instance of the CameraPosition type with a target point, zoom level, rotation, and tilt. ### Method init ### Parameters #### Path Parameters - **target** (targetPoint) - Required - The target point for the camera. - **zoomLevel** (zoomLevel) - Required - The zoom level of the camera. - **rotation** (rotation) - Required - The rotation of the camera. - **tilt** (tilt) - Required - The tilt angle of the camera. ## init() ### Description Initializes a new instance of the CameraPosition type with default values. ### Method init ``` -------------------------------- ### Draw a Route with Waypoints Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/GUIDE.md Draws a polyline connecting a series of waypoints and places POIs at the start and end points. This is useful for visualizing paths or routes. ```swift func drawRoute(waypoints: [MapPoint]) { guard let shapeLayer = kakaoMap.addShapeLayer(layerID: "route") else { return } // Draw connecting line let polyline = Polyline(line: waypoints, styleIndex: 0) shapeLayer.addPolyline(polyline) polyline.show() // Mark start and end guard let poiLayer = kakaoMap.addPoiLayer(layerID: "stops") else { return } for (index, point) in waypoints.enumerated() { let poi = Poi() poi.position = point poi.itemID = index poiLayer.addPoi(poi) poi.show() } } ``` -------------------------------- ### GuiLayout Properties Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/GuiLayout.md Details the properties available for configuring the GuiLayout. ```APIDOC ## Properties ### arrangement * **Type**: arrangement * **Description**: Property for arrangement. ### showSplitLine * **Type**: showSplitLine * **Description**: Property for showSplitLine. ### splitLineColor * **Type**: splitLineColor * **Description**: Property for splitLineColor. ### splitLineWidth * **Type**: splitLineWidth * **Description**: Property for splitLineWidth. ### bgColor * **Type**: bgColor * **Description**: Property for bgColor. ``` -------------------------------- ### addCameraWillMovedEventHandler Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/KakaoMap.md Registers a handler to be called just before the map's camera starts moving. This can be used to prepare UI elements or perform actions before the map view changes. ```APIDOC ## addCameraWillMovedEventHandler ### Description Registers a handler to be called when the map's camera will start moving. ### Parameters #### Path Parameters - `target` (NSObject?) - The target object for the event handler. - `handler` (@escaping (CameraActionEventParam) -> Void) - The closure to execute when the camera is about to move. It receives `CameraActionEventParam` containing information about the upcoming camera movement. ``` -------------------------------- ### Create a new Poi instance Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/Poi.md Initializes a new Poi object. You can then set its position and other properties. ```swift let poi = Poi() poi.position = MapPoint(longitude: 127.1086, latitude: 37.4216) ``` -------------------------------- ### Handle Camera Movement Events Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/index.md Add event handlers to be notified when the map's camera movement starts and stops. The stopped event provides the final camera position. ```swift // Camera movement kakaoMap.addCameraStoppedEventHandler(target: self) { event in print("Camera stopped at zoom: \(event.cameraPosition.zoomLevel)") } ``` -------------------------------- ### MapPoint Constructors Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/MapPoint.md This section details the constructors available for creating MapPoint instances, including initialization with longitude and latitude, and from a decoder. ```APIDOC ## MapPoint Constructors ### init(longitude:latitude:) Creates a new MapPoint with the specified geographic coordinates. **Parameters:** - `longitude` (Double) - Required - East-West position (-180.0 to 180.0) - `latitude` (Double) - Required - North-South position (-90.0 to 90.0) ### init(from:) Creates a MapPoint from a decoder (for deserialization). **Parameters:** - `from` (Decoder) - Required - Decoder instance ``` -------------------------------- ### PolylineShape Initialization Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/PolylineShape.md Initializes a new instance of the PolylineShape. ```APIDOC ## init() ### Description Initializes a new instance of the PolylineShape. ### Method `init()` ### Parameters None ``` -------------------------------- ### Handle Map and POI Interactions Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/GUIDE.md Set up event handlers for map taps, POI taps, and camera movements. Map taps provide the tapped point, POI taps can trigger info window displays, and camera events log the current zoom level. ```swift // Map taps kakaoMap.addMapTappedEventHandler(target: self) { point in print("Map tapped at: \(point)") } // POI taps poi.addPoiTappedEventHandler(target: self) { print("POI tapped") // Show info window let infoWindow = InfoWindow(title: "Title", body: "Description") poi.showInfoWindow(infoWindow) } // Camera movement kakaoMap.addCameraStoppedEventHandler(target: self) { event in print("Camera at zoom \(event.cameraPosition.zoomLevel)") } ``` -------------------------------- ### GuiManager Methods Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/GuiManager.md Methods for managing InfoWindow animators. ```APIDOC ## addInfoWindowAnimator(animatorID:effect:) ### Description Adds an InfoWindow animator. ### Method addInfoWindowAnimator ### Parameters - **animatorID** (string) - Required - The ID of the animator. - **effect** (any) - Required - The effect to apply to the animator. ``` ```APIDOC ## removeInfoWindowAnimator(animatorID:) ### Description Removes an InfoWindow animator. ### Method removeInfoWindowAnimator ### Parameters - **animatorID** (string) - Required - The ID of the animator to remove. ``` ```APIDOC ## clearAllInfoWindowAnimators() ### Description Clears all InfoWindow animators. ### Method clearAllInfoWindowAnimators ### Parameters None ``` ```APIDOC ## getInfoWindowAnimator(animatorID:) ### Description Retrieves an InfoWindow animator by its ID. ### Method getInfoWindowAnimator ### Parameters - **animatorID** (string) - Required - The ID of the animator to retrieve. ``` -------------------------------- ### GuiBase Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/types.md The base class for all GUI elements, providing common properties like name, delegate, and visibility. ```APIDOC ## GuiBase ### Description Provides fundamental properties and behaviors common to all graphical user interface elements. ### Properties - **name** (name): The name of the GUI element. - **delegate** (delegate): The delegate object for handling events. - **zOrder** (zOrder): The stacking order of the GUI element. - **isShow** (isShow): A boolean indicating if the GUI element is currently visible. ### Methods - 7 methods available for managing GUI elements. ``` -------------------------------- ### Initialize CameraPosition with Height Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/CameraPosition.md Initializes a new CameraPosition instance using a target point and a specific height for the camera. ```swift init(target:height:rotation:tilt:) ``` -------------------------------- ### Define Polyline Path with MapPoints Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/MapPoint.md Demonstrates creating a polyline by providing an array of MapPoint objects that define the vertices of the line to be drawn on the map. ```swift let route = [ MapPoint(longitude: 127.1, latitude: 37.4), MapPoint(longitude: 127.12, latitude: 37.42) ] let polyline = Polyline(line: route, styleIndex: 0) polyline.show() ``` -------------------------------- ### GetPhase Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/SDKInitializer.md Retrieves the current SDK phase ('production' or 'development') that was set during initialization. Returns nil if the SDK has not been initialized. ```APIDOC ## GetPhase ### Description Retrieves the currently configured SDK phase. ### Method ```swift func GetPhase() -> String? ``` ### Returns - **String?** - The phase string ("production" or "development"), or nil if the SDK has not been initialized. ### Request Example ```swift let initializer = SDKInitializer() initializer.InitSDK(appKey: "abc123xyz", phase: "development") if let phase = initializer.GetPhase() { print("Running in phase: \(phase)") } ``` ``` -------------------------------- ### CameraPosition Methods Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/CameraPosition.md Provides methods for interacting with CameraPosition instances. ```APIDOC ## copy(with:) ### Description Creates a copy of the current CameraPosition instance. ### Method copy ### Parameters #### Path Parameters - **with** (Any) - Required - The object to copy with. ``` -------------------------------- ### Enable Debug Logging for Kakao Map SDK Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/GUIDE.md Enable debug logging to troubleshoot initialization and map states. This snippet shows how to check initialization status, verify map view information, and monitor camera events. ```swift let initializer = SDKInitializer() print("App Key: \(initializer.GetAppKey() ?? \"NOT SET\")") print("Phase: \(initializer.GetPhase() ?? \"UNKNOWN\")") if let info = kakaoMap.getCurrentMapviewInfo() { print("Zoom: \(info.zoomLevel)") print("Center: \(info.centerPoint)") } kakaoMap.addCameraWillMovedEventHandler(target: self) { print("Camera moving...") } ``` -------------------------------- ### Add a New Label Layer Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/KakaoMap.md Creates and adds a new layer for displaying text labels. Returns the `LabelLayer` instance. ```swift func addLabelLayer(layerID: String) -> LabelLayer? ``` -------------------------------- ### ShapeLayer Constructors Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/ShapeLayer.md Initializes a new instance of the ShapeLayer. ```APIDOC ## init() ### Description Initializes a new instance of the type. ### Method init() ### Parameters None ### Response None ``` -------------------------------- ### showOverlay Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/KakaoMap.md Displays a custom UIView as an overlay on the map. ```APIDOC ## showOverlay ### Description Shows an overlay view on the map. ### Method Signature ```swift func showOverlay(_ overlay: UIView) -> Void ``` ### Parameters - `overlay` (UIView): The UIView to display as an overlay. ``` -------------------------------- ### Add Multiple InfoWindows to Animation Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/InfoWindowAnimator.md Adds multiple info windows to the animation sequence. Use this method to efficiently include several info windows in the animation. ```swift addInfoWindows(_:) ``` -------------------------------- ### RouteOptions Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/types.md Defines options for configuring a route, including its ID, style, and ordering. ```APIDOC ## RouteOptions ### Description Represents configuration options for a route, such as its unique identifier, visual style, and display layer. ### Properties - **routeID** (routeID) - Description not available - **styleID** (styleID) - Description not available - **zOrder** (zOrder) - Description not available - **segments** (segments) - Description not available ### Constructors - `init(styleID:zOrder:)` - `init(routeID:styleID:zOrder:)` - `init()` ``` -------------------------------- ### Create a Label Layer Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/GUIDE.md Create a layer specifically for adding text labels to the map. This helps in organizing and managing multiple labels. ```swift guard let labelLayer = kakaoMap.addLabelLayer(layerID: "labels") else { return } ``` -------------------------------- ### Set Camera Position with MapPoint Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/MapPoint.md Shows how to use a MapPoint to define the target location for the map's camera, along with a zoom level, to control the map's view. ```swift let targetLocation = MapPoint(longitude: 127.1086, latitude: 37.4216) let cameraPosition = CameraPosition(target: targetLocation, zoomLevel: 15) let cameraUpdate = CameraUpdate(position: cameraPosition) kakaoMap.moveCamera(cameraUpdate) ``` -------------------------------- ### Create and Display a POI Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/GUIDE.md Create a Point of Interest (POI) with a specific position and item ID, add it to a POI layer, and then display it on the map. Ensure the POI layer is already created. ```swift let poi = Poi() poi.position = MapPoint(longitude: 127.1086, latitude: 37.4216) poi.itemID = 1001 poiLayer.addPoi(poi) poi.show() ``` -------------------------------- ### GuiAnimatedImage Methods Source: https://github.com/kakao-mapssdk/kakaomapssdk-spm/blob/master/_autodocs/api-reference/GuiAnimatedImage.md Details the available methods for controlling and interacting with GuiAnimatedImage. ```APIDOC ## addImages(_:) ### Description Adds images to the animated image. ### Method addImages ### Parameters * **_**: (Type not specified) - Description not specified. ``` ```APIDOC ## getChild(_:) ### Description Retrieves a child element. ### Method getChild ### Parameters * **_**: (Type not specified) - Description not specified. ``` ```APIDOC ## start() ### Description Starts the animation. ### Method start ``` ```APIDOC ## stop() ### Description Stops the animation. ### Method stop ``` ```APIDOC ## resume() ### Description Resumes the animation. ### Method resume ``` ```APIDOC ## pause() ### Description Pauses the animation. ### Method pause ```