Skip to content

Commit

Permalink
✨ :: [#395] KakaoMapView / Poi Image 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
uuuunseo committed Aug 14, 2024
1 parent b1c7f80 commit 1f6d8cd
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 2 deletions.
21 changes: 21 additions & 0 deletions App/Resources/Image/Images.xcassets/Ping.imageset/Contents.json
Original file line number Diff line number Diff line change
@@ -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
}
}
23 changes: 23 additions & 0 deletions App/Resources/Image/Images.xcassets/Ping.imageset/Frame 7668.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 9 additions & 2 deletions App/Sources/Utils/View/KakaoMapView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 1f6d8cd

Please sign in to comment.