안녕하세요
개발한 앱에 안드로이드 카카오 지도 API를 통해 특정 위치를 마커로 보여주는 기능을 넣고 있는데요,
우측 하단에 "Kakao"라는 카피라이트문이 나타나지 않는 경우가 있습니다.
찾아보니 웹 API는 카피라이트 관련 메소드(위치 조정)이 있긴 하지만 안드로이드는 전혀 없는 것으로 아는데요,
혹시 어떤 이유로 이런 경우가 생길 수 있을까요?
카카오 지도 생성은 한 객체를 만들어 그 것이 전담하도록 했는데요, 코드는 다음과 같습니다.
public class KakaoMapView extends PlaceMapView implements MapView.MapViewEventListener {
private static final String TAG = "KakaoMapView";
private MapView mMapView;
private final ViewGroup mMapViewContainer;
public KakaoMapView(Context context, RelativeLayout mapViewContainer) {
mMapView = new MapView(context);
mMapViewContainer = mapViewContainer;
mMapViewContainer.addView(mMapView);
}
private void initKakaoMap() {
SALog.i(TAG, "map is ready!!");
if (isGestureEnabled()) {
mMapView.setOnTouchListener(null);
} else {
mMapView.setOnTouchListener((v, event) -> true);
}
double[] location = getInitLocation();
if (LocationUtils.isValidLocation(location)) {
drawPin(location[0], location[1], false);
}
mMapView.setZoomLevel(3, false);
mMapView.setMapViewEventListener(this);
}
@Override
public void onCreate(Bundle savedState) {
initKakaoMap();
}
@Override
public void onResume() {
// do nothing
}
@Override
public void onStart() {
// do nothing
}
@Override
public void onStop() {
// do nothing
}
@Override
public void onPause() {
// do nothing
}
@Override
public void onDestroy() {
mMapViewContainer.removeView(mMapView);
}
@Override
public void onLowMemory() {
// do nothing
}
@Override
public void drawPin(double latitude, double longitude, boolean isRefresh) {
if (mMapView == null) {
SALog.e(TAG, "map is null!!");
return;
}
if (mMapView.getPOIItems().length != 0) {
mMapView.removeAllPOIItems();
}
MapPOIItem mapPOIItem = new MapPOIItem();
MapPoint mapPoint = MapPoint.mapPointWithGeoCoord(latitude, longitude);
mapPOIItem.setMapPoint(mapPoint);
mapPOIItem.setItemName("Marker");
mapPOIItem.setMarkerType(MapPOIItem.MarkerType.CustomImage);
mapPOIItem.setCustomImageBitmap(getPinImage());
mapPOIItem.setCustomImageAutoscale(false);
mapPOIItem.setCustomImageAnchor(0.5f, 1.0f);
mapPOIItem.setDraggable(false);
mapPOIItem.setShowCalloutBalloonOnTouch(false);
mMapView.addPOIItem(mapPOIItem);
mMapView.setMapCenterPoint(mapPoint, isAnimationEnabled());
mMapView.moveCamera(CameraUpdateFactory.newMapPoint(mapPoint));
}
public boolean isMapViewRemoved() {
return mMapView.getParent() == null;
}
public void addKakaoMapAgain(Context context) {
mMapView = new MapView(context);
mMapViewContainer.addView(mMapView);
initKakaoMap();
}
@Override
public void clear() {
// do nothing
}
@Override
public void onMapViewInitialized(MapView mapView) {
// do nothing
}
@Override
public void onMapViewCenterPointMoved(MapView mapView, MapPoint mapPoint) {
// do nothing
}
@Override
public void onMapViewZoomLevelChanged(MapView mapView, int i) {
// do nothing
}
@Override
public void onMapViewSingleTapped(MapView mapView, MapPoint mapPoint) {
// do nothing
}
@Override
public void onMapViewDoubleTapped(MapView mapView, MapPoint mapPoint) {
// do nothing
}
@Override
public void onMapViewLongPressed(MapView mapView, MapPoint mapPoint) {
getMapLongClickListener().execute(mapPoint.getMapPointGeoCoord().latitude, mapPoint.getMapPointGeoCoord().longitude);
}
@Override
public void onMapViewDragStarted(MapView mapView, MapPoint mapPoint) {
// do nothing
}
@Override
public void onMapViewDragEnded(MapView mapView, MapPoint mapPoint) {
// do nothing
}
@Override
public void onMapViewMoveFinished(MapView mapView, MapPoint mapPoint) {
// do nothing
}
}