From 1f6d8cd013317a3fccffefb4d79e92c175b0aaae Mon Sep 17 00:00:00 2001 From: uuuunseo Date: Thu, 15 Aug 2024 00:01:45 +0900 Subject: [PATCH] =?UTF-8?q?:sparkles:=20::=20[#395]=20KakaoMapView=20/=20P?= =?UTF-8?q?oi=20Image=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Ping.imageset/Contents.json | 21 +++++++++++++++++ .../Ping.imageset/Frame 7668.svg | 23 +++++++++++++++++++ App/Sources/Utils/View/KakaoMapView.swift | 11 +++++++-- 3 files changed, 53 insertions(+), 2 deletions(-) create mode 100644 App/Resources/Image/Images.xcassets/Ping.imageset/Contents.json create mode 100644 App/Resources/Image/Images.xcassets/Ping.imageset/Frame 7668.svg diff --git a/App/Resources/Image/Images.xcassets/Ping.imageset/Contents.json b/App/Resources/Image/Images.xcassets/Ping.imageset/Contents.json new file mode 100644 index 000000000..54701dbce --- /dev/null +++ b/App/Resources/Image/Images.xcassets/Ping.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "Frame 7668.svg", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/App/Resources/Image/Images.xcassets/Ping.imageset/Frame 7668.svg b/App/Resources/Image/Images.xcassets/Ping.imageset/Frame 7668.svg new file mode 100644 index 000000000..9cfce76ef --- /dev/null +++ b/App/Resources/Image/Images.xcassets/Ping.imageset/Frame 7668.svg @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/App/Sources/Utils/View/KakaoMapView.swift b/App/Sources/Utils/View/KakaoMapView.swift index 8fb2b374d..2863ddb62 100644 --- a/App/Sources/Utils/View/KakaoMapView.swift +++ b/App/Sources/Utils/View/KakaoMapView.swift @@ -132,8 +132,15 @@ struct KakaoMapView: UIViewRepresentable { } let manager = view.getLabelManager() - let iconStyle1 = PoiIconStyle(symbol: UIImage(systemName: "mappin"), anchorPoint: CGPoint(x: 0.0, y: 0.5)) - let iconStyle2 = PoiIconStyle(symbol: UIImage(systemName: "mappin"), anchorPoint: CGPoint(x: 0.0, y: 0.5)) + let poiImage = BitgouelAsset.Images.ping.image + let newPoiImageRect = CGRect(x: 0, y: 0, width: 96, height: 96) + UIGraphicsBeginImageContext(CGSize(width: 96, height: 96)) + poiImage.draw(in: newPoiImageRect) + let newPoiImage = UIGraphicsGetImageFromCurrentImageContext()?.withRenderingMode(.alwaysOriginal) + UIGraphicsEndImageContext() + + let iconStyle1 = PoiIconStyle(symbol: newPoiImage, anchorPoint: CGPoint(x: 0.0, y: 0.5)) + let iconStyle2 = PoiIconStyle(symbol: newPoiImage, anchorPoint: CGPoint(x: 0.0, y: 0.5)) let poiStyle = PoiStyle(styleID: "PerLevelStyle", styles: [ PerLevelPoiStyle(iconStyle: iconStyle1, level: 5),