Skip to content

Commit

Permalink
약속 장소 맵 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
jins0704 committed Mar 31, 2021
1 parent d1c236b commit 9549702
Show file tree
Hide file tree
Showing 78 changed files with 2,181 additions and 44 deletions.
Binary file modified .DS_Store
Binary file not shown.
12 changes: 12 additions & 0 deletions WhereYa-Bridging-Header.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
//
// Header.h
// WhereYa
//
// Created by 홍진석 on 2021/04/01.
//

#ifndef Header_h
#define Header_h

#import <DaumMap/MTMapView.h>
#endif /* WhereYa_Bridging_Header_h */
304 changes: 302 additions & 2 deletions WhereYa.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Binary file added WhereYa/.DS_Store
Binary file not shown.
29 changes: 29 additions & 0 deletions WhereYa/Controller/탭바/Promise/BasePromiseMakeVC.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
//
// BasePromiseVC.swift
// WhereYa
//
// Created by 홍진석 on 2021/04/01.
//

import UIKit

class BasePromiseMakeVC: UINavigationController {

override func viewDidLoad() {
super.viewDidLoad()

// Do any additional setup after loading the view.
}


/*
// MARK: - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
// Get the new view controller using segue.destination.
// Pass the selected object to the new view controller.
}
*/

}
8 changes: 6 additions & 2 deletions WhereYa/Controller/탭바/Promise/FirstPromiseMakeVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@ class FirstPromiseMakeVC: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()

// Do any additional setup after loading the view.
navigationController?.navigationBar.isHidden = true
tabBarController?.tabBar.isHidden = true
}

@IBAction func backBtnClicked(_ sender: Any) {
navigationController?.popViewController(animated: true)
}


/*
// MARK: - Navigation

Expand Down
8 changes: 8 additions & 0 deletions WhereYa/Controller/탭바/Promise/PromiseMainVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ class PromiseMainVC: UIViewController {
}


@IBAction func promiseBtnClicked(_ sender: Any) {
let storyboard = UIStoryboard.init(name: "PromiseMake", bundle: nil)
let promiseMakeVC = storyboard.instantiateViewController(identifier:"BasePromiseMakeVC") as! BasePromiseMakeVC

promiseMakeVC.modalPresentationStyle = .fullScreen
self.present(promiseMakeVC, animated: true, completion: nil)
}

/*
// MARK: - Navigation

Expand Down
64 changes: 64 additions & 0 deletions WhereYa/Controller/탭바/Promise/PromiseMapVC.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
//
// PromiseMapVC.swift
// WhereYa
//
// Created by 홍진석 on 2021/04/01.
//

import UIKit

public let DEFAULT_POSITION = MTMapPointGeo(latitude: 37.576568, longitude: 127.029148)
class PromiseMapVC: UIViewController, MTMapViewDelegate {

var mapView: MTMapView?

var mapPoint1: MTMapPoint?
var poiItem1: MTMapPOIItem?

override func viewDidLoad() {
super.viewDidLoad()

// 지도 불러오기
mapView = MTMapView(frame: self.view.bounds)

if let mapView = mapView {
mapView.delegate = self
mapView.baseMapType = .standard

// 지도 중심점, 레벨
mapView.setMapCenter(MTMapPoint(geoCoord: DEFAULT_POSITION), zoomLevel: 4, animated: true)

// 현재 위치 트래킹
mapView.showCurrentLocationMarker = true
mapView.currentLocationTrackingMode = .onWithoutHeading

// 마커 추가
self.mapPoint1 = MTMapPoint(geoCoord: MTMapPointGeo(latitude: 37.585568, longitude: 127.019148))
poiItem1 = MTMapPOIItem()
poiItem1?.markerType = MTMapPOIItemMarkerType.bluePin
poiItem1?.mapPoint = mapPoint1
poiItem1?.itemName = "아무데나 찍어봄"
mapView.add(poiItem1)

// mapView.addPOIItems([poiItem1,poiItem2]
// mapView.fitAreaToShowAllPOIItems()

self.view.addSubview(mapView)
}

}


// Custom: 현 위치 트래킹 함수
func mapView(_ mapView: MTMapView!, updateCurrentLocation location: MTMapPoint!, withAccuracy accuracy: MTMapLocationAccuracy) {
let currentLocation = location?.mapPointGeo()
if let latitude = currentLocation?.latitude, let longitude = currentLocation?.longitude{
print("MTMapView updateCurrentLocation (\(latitude),\(longitude)) accuracy (\(accuracy))")
}
}

func mapView(_ mapView: MTMapView?, updateDeviceHeading headingAngle: MTMapRotationAngle) {
print("MTMapView updateDeviceHeading (\(headingAngle)) degrees")
}

}
14 changes: 10 additions & 4 deletions WhereYa/Controller/탭바/Promise/SecondPromiseMakeVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,22 @@

import UIKit

class SecondPromiseMakeVC: UIViewController {

class SecondPromiseMakeVC: UIViewController, MTMapViewDelegate {
override func viewDidLoad() {
super.viewDidLoad()

// Do any additional setup after loading the view.
navigationController?.navigationBar.isHidden = true
tabBarController?.tabBar.isHidden = true


}
@IBAction func backBtnClicked(_ sender: Any) {
navigationController?.popViewController(animated: true)
}


/*

// MARK: - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
Expand Down
Binary file added WhereYa/DaumMap.embeddedframework/.DS_Store
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
/**
* @brief Map CameraUpdate Class
* @file MTMapCameraUpdate.h
* @author Soo-Hyun Park ([email protected])
* @date 2014/7/16
* @copyright
* Copyright 2014 Daum Communications Corp. All rights reserved.
*/

#import <Foundation/Foundation.h>
#import <DaumMap/MTMapGeometry.h>
#import <DaumMap/MTMapView.h>


/**
* @brief 지도 화면 처리를 담당하는 Class
* 지도 화면 이동/확대/축소 등의 기능이 제공된다.
* @see MTMapView
*/

@interface MTMapCameraUpdate : NSObject

/**
* 지도 화면을 현재의 확대/축소 레벨을 유지한 상태로
* 설정한 중심점으로 이동한다.
* @param mapPoint 이동하는 지도 화면의 중심점
*/

+ (MTMapCameraUpdate *)move:(MTMapPoint *)mapPoint;

/**
* 지도 화면을 설정한 확대/축소 레벨로 조정 및
* 설정한 중심점으로 이동한다.
* @param mapPoint 이동하는 지도 화면의 중심점
* @param zoomLevel 변경된 지도 확대/축소 레벨
*/

+ (MTMapCameraUpdate *)move:(MTMapPoint *)mapPoint withZoomLevel:(MTMapZoomLevel)zoomLevel;

/**
* 설정한 중심점으로 이동하면서 지정한 직경(meter) 영역이 보이도록 줌레벨이 조정된다.
* 지정한 영역의 padding 값은 0
* @param mapPoint 이동하는 지도 화면의 중심점
* @param meter 직경(지름)
*/

+ (MTMapCameraUpdate *)move:(MTMapPoint *)mapPoint withDiameter:(CGFloat)meter;

/**
* 설정한 중심점으로 이동하면서 지정한 직경(meter) 영역이 보이도록 줌레벨이 조정된다.
* @param mapPoint 이동하는 지도 화면의 중심점
* @param meter 직경(지름)
* @param padding 지정한 영역의 padding 값
*/

+ (MTMapCameraUpdate *)move:(MTMapPoint *)mapPoint withDiameter:(CGFloat)meter withPadding:(CGFloat)padding;

/**
* 지정한 영역이 화면에 나타나도록 지도화면 중심과 확대/축소 레벨을 자동조절한다.
* 지정한 영역의 padding 값은 0
* @deprecated 제거될 예정. fitMapViewWithMapBounds: 를 사용하세요.
* @param bounds 화면에 보여주고자 하는 영역 (MTMapPoint 타입의 좌하단 지점과 우상단 지점을 인자로 갖는 구조체)
*/

+ (MTMapCameraUpdate *)fitMapView:(MTMapBounds)bounds;

/**
* padding 값을 반영한 지정한 영역이 화면에 지정된 나타나도록 지도화면 중심과 확대/축소 레벨을 자동조절한다.
* @deprecated 제거될 예정. fitMapViewWithMapBounds:withPadding: 를 사용하세요.
* @param bounds 화면에 보여주고자 하는 영역 (MTMapPoint 타입의 좌하단 지점과 우상단 지점을 인자로 갖는 구조체)
* @param padding 지정한 영역의 padding 값
*/

+ (MTMapCameraUpdate *)fitMapView:(MTMapBounds)bounds withPadding:(CGFloat)padding;

/**
* padding 값을 반영한 지정한 영역이 화면에 지정된 나타나도록 하되
* 지정한 최소 레벨과 최대 레벨 범위 안의 지도화면 중심과 확대/축소 레벨을 자동조절 한다.
* @deprecated 제거될 예정. fitMapViewWithMapBounds:withPadding:withMinZoomLevel:withMaxZoomLevel: 를 사용하세요.
* @param bounds 화면에 보여주고자 하는 영역 (MTMapPoint 타입의 좌하단 지점과 우상단 지점을 인자로 갖는 구조체)
* @param padding 지정한 영역의 padding 값
* @param minZoomLevel 지도 화면 최대 확대 레벨 값 (-2~12, 값이 작을수록 더 좁은 영역이 화면이 보임. 지도 화면이 확대됨)
* @param maxZoomLevel 지도 화면 최대 축소 레벨 값 (-2~12, 값이 클수록 더 넓은 영역이 화면이 보임. 지도 화면이 축소됨)
*/

+ (MTMapCameraUpdate *)fitMapView:(MTMapBounds)bounds withPadding:(CGFloat)padding withMinZoomLevel:(MTMapZoomLevel)minZoomLevel withMaxZoomLevel:(MTMapZoomLevel)maxZoomLevel;

/**
* 지정한 영역이 화면에 나타나도록 지도화면 중심과 확대/축소 레벨을 자동조절한다.
* 지정한 영역의 padding 값은 0
* @param bounds 화면에 보여주고자 하는 영역 (MTMapPoint 타입의 좌하단 지점과 우상단 지점을 인자로 갖는 구조체)
*/

+ (MTMapCameraUpdate *)fitMapViewWithMapBounds:(MTMapBoundsRect *)bounds;

/**
* padding 값을 반영한 지정한 영역이 화면에 지정된 나타나도록 지도화면 중심과 확대/축소 레벨을 자동조절한다.
* @param bounds 화면에 보여주고자 하는 영역 (MTMapPoint 타입의 좌하단 지점과 우상단 지점을 인자로 갖는 구조체)
* @param padding 지정한 영역의 padding 값
*/

+ (MTMapCameraUpdate *)fitMapViewWithMapBounds:(MTMapBoundsRect *)bounds withPadding:(CGFloat)padding;

/**
* padding 값을 반영한 지정한 영역이 화면에 지정된 나타나도록 하되
* 지정한 최소 레벨과 최대 레벨 범위 안의 지도화면 중심과 확대/축소 레벨을 자동조절 한다.
* @param bounds 화면에 보여주고자 하는 영역 (MTMapPoint 타입의 좌하단 지점과 우상단 지점을 인자로 갖는 구조체)
* @param padding 지정한 영역의 padding 값
* @param minZoomLevel 지도 화면 최대 확대 레벨 값 (-2~12, 값이 작을수록 더 좁은 영역이 화면이 보임. 지도 화면이 확대됨)
* @param maxZoomLevel 지도 화면 최대 축소 레벨 값 (-2~12, 값이 클수록 더 넓은 영역이 화면이 보임. 지도 화면이 축소됨)
*/

+ (MTMapCameraUpdate *)fitMapViewWithMapBounds:(MTMapBoundsRect *)bounds withPadding:(CGFloat)padding withMinZoomLevel:(MTMapZoomLevel)minZoomLevel withMaxZoomLevel:(MTMapZoomLevel)maxZoomLevel;

@end




Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
/**
* @brief Map Circle Class
* @file MTMapCircle.h
* @author Soo-Hyun Park ([email protected])
* @date 2014/6/11
* @copyright
* Copyright 2014 Daum Communications Corp. All rights reserved.
*/

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <DaumMap/MTMapGeometry.h>

/**
* @brief 지도도화면 위에 추가되는 Circle에 해당하는 Class.
* 지도화면 위에 Circle을 추가하기 위해서는
* MTMapCircle 객체를 생성하여 MTMapView객체에 등록해 주어야 한다.
* (MTMapView.addCircle:)
* Circle의 중심점을 설정하고 선 색상, 선 두께, 영역 색깔, 반경을 지정할 수 있다.
* @see MTMapView
*/
@interface MTMapCircle : NSObject {
@private
MTMapPoint* _circleCenterPoint;
float _circleLineWidth;
UIColor* _circleLineColor;
UIColor* _circleFillColor;
float _circleRadius;
NSInteger _tag;
}

/**
* MTMapCircle 객체를 생성한다. autorelease 상태로 MTMapCircle 객체를 생성하여 리턴한다.
*/
+ (instancetype)circle;

/**
* Circle의 중심점을 지정한다.
*/
@property (nonatomic, retain) MTMapPoint* circleCenterPoint;

/**
* Circle의 선 두께를 지정한다.
*/
@property (nonatomic, assign) float circleLineWidth;

/**
* Circle의 선 색상을 지정한다.
*/
@property (nonatomic, retain) UIColor* circleLineColor;

/**
* Circle의 영역 색상을 지정한다.
*/
@property (nonatomic, retain) UIColor* circleFillColor;

/**
* Circle의 반경 값을 지정한다.
*/
@property (nonatomic, assign) float circleRadius;

/**
* Circle 객체에 임의의 정수값(tag)을 지정할 수 있다.
* MTMapView에 등록된 Circle들 중 특정 Circle을 찾기 위한 식별자로 사용할 수 있다.
* tag값을 반드시 지정해야 하는 것은 아니다.
* @see MTMapView.findCircleByTag:
*/
@property (nonatomic, assign) NSInteger tag;

@end
Loading

0 comments on commit 9549702

Please sign in to comment.