Constructor 링크 복사
초깃값으로 설정된 KNMapCoordinateRegion
객체를 생성합니다.
fun createKNCoordinateregion(): KNMapCoordinateRegion {
return KNMapCoordinateRegion()
}
fun inRegionZone() {
mapView.getScreenRect(KNMapCoordinateRegion())
}
fun createKNCoordinateregion(): KNMapCoordinateRegion {
return KNMapCoordinateRegion()
}
fun inRegionZone() {
mapView.getScreenRect(KNMapCoordinateRegion())
}
카텍(KATEC) 영역의 최소, 최대 좌표 값을 받아 KNMapCoordinateRegion
객체를 생성합니다. 이후 추가되는 min
, max
값은 mergeWithMinMax
함수를 통해 입력 받은 값과 합칠 수 있습니다. 최소/최댓값을 가지는 region
인스턴스를 반환합니다.
fun initWithMinMax( | min: | FloatPoint, | |
max: | FloatPoint | ): KNMapCoordinateRegion |
fun createWithMinMaxKNCoordinateregion(min: FloatPoint, max:FloatPoint): KNMapCoordinateRegion {
return KNMapCoordinateRegion.initWithMinMax(min, max)
}
fun fitToWithRegion(isAnimate: Boolean, withUseLocation: Boolean) {
val coordinate = WGS84ToKATEC(127.11019081347423,37.3941851228957)
val min = FloatPoint(coordinate.x - 100f, coordinate.y - 100f)
val max = FloatPoint(coordinate.x + 100f, coordinate.y + 100f)
if (isAnimate) {
mapView.animateCamera(
KNMapCameraUpdate.fitTo(createWithMinMaxKNCoordinateregion(min, max)),
500L,
withUseLocation)
} else {
mapView.moveCamera(
KNMapCameraUpdate.fitTo(createWithMinMaxKNCoordinateregion(min, max)),
withUseLocation)
}
}
fun createWithMinMaxKNCoordinateregion(min: FloatPoint, max:FloatPoint): KNMapCoordinateRegion {
return KNMapCoordinateRegion.initWithMinMax(min, max)
}
fun fitToWithRegion(isAnimate: Boolean, withUseLocation: Boolean) {
val coordinate = WGS84ToKATEC(127.11019081347423,37.3941851228957)
val min = FloatPoint(coordinate.x - 100f, coordinate.y - 100f)
val max = FloatPoint(coordinate.x + 100f, coordinate.y + 100f)
if (isAnimate) {
mapView.animateCamera(
KNMapCameraUpdate.fitTo(createWithMinMaxKNCoordinateregion(min, max)),
500L,
withUseLocation)
} else {
mapView.moveCamera(
KNMapCameraUpdate.fitTo(createWithMinMaxKNCoordinateregion(min, max)),
withUseLocation)
}
}
- min
- 영역의 최솟값
- max
- 영역의 최댓값
경로 리스트를 받아 KNMapCoordinateRegion
객체를 생성합니다. 이후 mergeWithRoute
함수를 통해 입력된 경로를 이 리스트에 추가할 수 있습니다. 경로 리스트를 가지는 region
인스턴스를 반환합니다.
fun initWithRoute( | routes: | List <KNRoute> | ): KNMapCoordinateRegion |
fun createWithRouteKNCoordinateregion(routes:List<KNRoute>): KNMapCoordinateRegion {
return KNMapCoordinateRegion.initWithRoute(routes)
}
fun collisionRectWithRegion(routes: List<KNRoute>) {
val coordinate = WGS84ToKATEC(127.11019081347423,37.3941851228957)
val screenPoint = mapView.katecToScreen(coordinate)
mapView.isOverlappedWithScreenRect(
RectF(screenPoint.x - 50f, screenPoint.y - 50f, screenPoint.x + 50f, screenPoint.y + 50f),
createWithRouteKNCoordinateregion(routes)
)
}
fun createWithRouteKNCoordinateregion(routes:List<KNRoute>): KNMapCoordinateRegion {
return KNMapCoordinateRegion.initWithRoute(routes)
}
fun collisionRectWithRegion(routes: List<KNRoute>) {
val coordinate = WGS84ToKATEC(127.11019081347423,37.3941851228957)
val screenPoint = mapView.katecToScreen(coordinate)
mapView.isOverlappedWithScreenRect(
RectF(screenPoint.x - 50f, screenPoint.y - 50f, screenPoint.x + 50f, screenPoint.y + 50f),
createWithRouteKNCoordinateregion(routes)
)
}
- routes
- 경로 리스트
마커 리스트를 받아 KNMapCoordinateRegion
객체를 생성합니다. 이후 mergeWithMarkers
함수를 통해 입력된 마커를 이 리스트에 추가할 수 있습니다. 마커 리스트를 가지는 region
인스턴스를 반환합니다.
fun initWithMarkers( | markers: | List <KNMapMarker> | ): KNMapCoordinateRegion |
fun createWithMarkersKNCoordinateregion(markers:List<KNMapMarker>): KNMapCoordinateRegion {
return KNMapCoordinateRegion.initWithMarkers(markers)
}
fun collisionTouchPointWithRegion(touchPoint: FloatPoint, markers: List<KNMapMarker>) {
val coordinate = WGS84ToKATEC(127.11019081347423,37.3941851228957)
var selectMarker: KNMapMarker? = null
for (marker in markers) {
if (mapView.isOverlappedWithScreenPoint(
touchPoint,
createWithMarkersKNCoordinateregion(listOf(marker)))) {
selectMarker = marker
break
}
}
}
fun createWithMarkersKNCoordinateregion(markers:List<KNMapMarker>): KNMapCoordinateRegion {
return KNMapCoordinateRegion.initWithMarkers(markers)
}
fun collisionTouchPointWithRegion(touchPoint: FloatPoint, markers: List<KNMapMarker>) {
val coordinate = WGS84ToKATEC(127.11019081347423,37.3941851228957)
var selectMarker: KNMapMarker? = null
for (marker in markers) {
if (mapView.isOverlappedWithScreenPoint(
touchPoint,
createWithMarkersKNCoordinateregion(listOf(marker)))) {
selectMarker = marker
break
}
}
}
- markers
- 마커 리스트
함수 링크 복사
카텍(KATEC) 영역의 최소, 최대 좌표 값을 받아 KNMapCoordinateRegion
객체를 생성합니다. 이후 추가되는 min
, max
값은 mergeWithMinMax
함수를 통해 입력 받은 값과 합칠 수 있습니다. 최소/최댓값을 가지는 region
인스턴스를 반환합니다.
fun initWithMinMax( | min: | FloatPoint, | |
max: | FloatPoint | ): KNMapCoordinateRegion |
fun createWithMinMaxKNCoordinateregion(min: FloatPoint, max:FloatPoint): KNMapCoordinateRegion {
return KNMapCoordinateRegion().initWithMinMax(min, max)
}
fun fitToWithRegion(isAnimate: Boolean, withUseLocation: Boolean) {
val coordinate = WGS84ToKATEC(127.11019081347423,37.3941851228957)
val min = FloatPoint(coordinate.x - 100f, coordinate.y - 100f)
val max = FloatPoint(coordinate.x + 100f, coordinate.y + 100f)
if (isAnimate) {
mapView.animateCamera(
KNMapCameraUpdate.fitTo(createWithMinMaxKNCoordinateregion(min, max)),
500L,
withUseLocation)
} else {
mapView.moveCamera(
KNMapCameraUpdate.fitTo(createWithMinMaxKNCoordinateregion(min, max)),
withUseLocation)
}
}
fun createWithMinMaxKNCoordinateregion(min: FloatPoint, max:FloatPoint): KNMapCoordinateRegion {
return KNMapCoordinateRegion().initWithMinMax(min, max)
}
fun fitToWithRegion(isAnimate: Boolean, withUseLocation: Boolean) {
val coordinate = WGS84ToKATEC(127.11019081347423,37.3941851228957)
val min = FloatPoint(coordinate.x - 100f, coordinate.y - 100f)
val max = FloatPoint(coordinate.x + 100f, coordinate.y + 100f)
if (isAnimate) {
mapView.animateCamera(
KNMapCameraUpdate.fitTo(createWithMinMaxKNCoordinateregion(min, max)),
500L,
withUseLocation)
} else {
mapView.moveCamera(
KNMapCameraUpdate.fitTo(createWithMinMaxKNCoordinateregion(min, max)),
withUseLocation)
}
}
- min
- 영역의 최솟값
- max
- 영역의 최댓값
경로 리스트를 받아 KNMapCoordinateRegion
객체를 생성합니다. 이후 mergeWithRoute
함수를 통해 입력된 경로를 이 리스트에 추가할 수 있습니다. 경로 리스트를 가지는 region
인스턴스를 반환합니다.
fun initWithRoute( | routes: | List <KNRoute> | ): KNMapCoordinateRegion |
fun createWithRouteKNCoordinateregion(routes:List<KNRoute>): KNMapCoordinateRegion {
return KNMapCoordinateRegion().initWithRoute(routes)
}
fun collisionRectWithRegion(routes: List<KNRoute>) {
val coordinate = WGS84ToKATEC(127.11019081347423,37.3941851228957)
val screenPoint = mapView.katecToScreen(coordinate)
mapView.isOverlappedWithScreenRect(
RectF(screenPoint.x - 50f, screenPoint.y - 50f, screenPoint.x + 50f, screenPoint.y + 50f),
createWithRouteKNCoordinateregion(routes)
)
}
fun createWithRouteKNCoordinateregion(routes:List<KNRoute>): KNMapCoordinateRegion {
return KNMapCoordinateRegion().initWithRoute(routes)
}
fun collisionRectWithRegion(routes: List<KNRoute>) {
val coordinate = WGS84ToKATEC(127.11019081347423,37.3941851228957)
val screenPoint = mapView.katecToScreen(coordinate)
mapView.isOverlappedWithScreenRect(
RectF(screenPoint.x - 50f, screenPoint.y - 50f, screenPoint.x + 50f, screenPoint.y + 50f),
createWithRouteKNCoordinateregion(routes)
)
}
- routes
- 경로 리스트
마커 리스트를 받아 KNMapCoordinateRegion
객체를 생성합니다. 이후 mergeWithMarkers
함수를 통해 입력된 마커를 이 리스트에 추가할 수 있습니다. 마커 리스트를 가지는 region
인스턴스를 반환합니다.
fun initWithMarkers( | markers: | List <KNMapMarker> | ): KNMapCoordinateRegion |
fun createWithMarkersKNCoordinateregion(markers:List<KNMapMarker>): KNMapCoordinateRegion {
return KNMapCoordinateRegion().initWithMarkers(markers)
}
fun collisionTouchPointWithRegion(touchPoint: FloatPoint, markers: List<KNMapMarker>) {
val coordinate = WGS84ToKATEC(127.11019081347423,37.3941851228957)
var selectMarker: KNMapMarker? = null
for (marker in markers) {
if (mapView.isOverlappedWithScreenPoint(
touchPoint,
createWithMarkersKNCoordinateregion(listOf(marker)))) {
selectMarker = marker
break
}
}
}
fun createWithMarkersKNCoordinateregion(markers:List<KNMapMarker>): KNMapCoordinateRegion {
return KNMapCoordinateRegion().initWithMarkers(markers)
}
fun collisionTouchPointWithRegion(touchPoint: FloatPoint, markers: List<KNMapMarker>) {
val coordinate = WGS84ToKATEC(127.11019081347423,37.3941851228957)
var selectMarker: KNMapMarker? = null
for (marker in markers) {
if (mapView.isOverlappedWithScreenPoint(
touchPoint,
createWithMarkersKNCoordinateregion(listOf(marker)))) {
selectMarker = marker
break
}
}
}
- markers
- 마커 리스트
KNMapCoordinateRegion
의 최소, 최대 좌표 값과 인자의 최소, 최댓값을 비교하여 각각 가장 최소, 최댓값인 데이터로 값을 업데이트합니다. 최소/최댓값을 가지는 region
인스턴스를 반환합니다.
min
, max
는 카텍(KATEC) 좌표를 기준으로 합니다.
fun mergeWithMinMaxKNCoordinateregion(min: FloatPoint, max: FloatPoint): KNMapCoordinateRegion {
return KNMapCoordinateRegion().mergeWithMinMax(min, max)
}
fun mergeWithMinMaxKNCoordinateregion(min: FloatPoint, max: FloatPoint): KNMapCoordinateRegion {
return KNMapCoordinateRegion().mergeWithMinMax(min, max)
}
- min
- 영역의 최솟값
- max
- 영역의 최댓값
KNMapCoordinateRegion
의 경로 리스트에 입력 받은 경로 리스트를 추가합니다.
fun mergeWithRoutesKNCoordinateregion(routes:List<KNRoute>): KNMapCoordinateRegion {
return KNMapCoordinateRegion().mergeWithRoutes(routes)
}
fun mergeWithRoutesKNCoordinateregion(routes:List<KNRoute>): KNMapCoordinateRegion {
return KNMapCoordinateRegion().mergeWithRoutes(routes)
}
- routes
- 경로 리스트
KNMapCoordinateRegion
의 마커 리스트에 마커 리스트를 추가합니다.
fun mergeWithMarkersKNCoordinateregion(markers:List<KNMapMarker>): KNMapCoordinateRegion {
return KNMapCoordinateRegion().mergeWithMarkers(markers)
}
fun mergeWithMarkersKNCoordinateregion(markers:List<KNMapMarker>): KNMapCoordinateRegion {
return KNMapCoordinateRegion().mergeWithMarkers(markers)
}
- markers
- 마커 리스트
KNMapCoordinateRegion
의 모든 요소와 입력 받은 region
의 요소를 합칩니다.
fun mergeWithRegionKNCoordinateregion(region: KNMapCoordinateRegion): KNMapCoordinateRegion {
return KNMapCoordinateRegion().mergeWithRegion(region)
}
fun mergeWithRegionKNCoordinateregion(region: KNMapCoordinateRegion): KNMapCoordinateRegion {
return KNMapCoordinateRegion().mergeWithRegion(region)
}
- region
- KNMapCoordinateRegion에서 영역