Skip to content

Android에서 LifeCycle이 Changed될 경우, NaverMap이 검은색으로 표출되는 문제 #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
emotionalboySY opened this issue Mar 30, 2023 · 2 comments
Labels
1.0 (deprecated label) 1.0 version's issue Android bug Something isn't working

Comments

@emotionalboySY
Copy link

emotionalboySY commented Mar 30, 2023

플러그인 사용 중 추가 문제가 발생한 부분이 있어 질문드리려 합니다.

  1. MainPage에는 SubPage로 들어가기 위한 버튼이 존재합니다.
  2. SubPage에는 NaverMap Widget이 포함되어 있습니다. (화면 전체크기 X, 일부)
  3. SubPage에서의 NaverMap Widget은 별다른 interaction을 허용하지 않으며, 해당 Widget Field를 tap 하면 initialCameraPosition이 가리키고 있던 곳을 그대로 네이버 지도 애플리케이션에서 보여주도록 로직이 설정되어 있습니다.

NaverMap Widget

NaverMap(
  options: NaverMapViewOptions(
    initialCameraPosition: NCameraPosition(
      target: feedController.locCoord,
      zoom: 15,
    ),
    locationButtonEnable: true,
    consumeSymbolTapEvents: false,
  ),
  onMapReady: (controller) async {
    _mapControllerCompleter.complete(controller);
    NMarker marker = NMarker(id: '1', position: feedController.locCoord);
    controller.addOverlay(marker);
  },
  onMapTapped: (point, position) {
    mapLaunch(feedController.locCoord);
  },
),

maplaunch()

void mapLaunch(NLatLng latlng) async {
    double lat = latlng.latitude;
    double lng = latlng.longitude;
    String name = feedController.feedData!.value.title;
    String url =
        "nmap://place?lat=$lat&lng=$lng&name=$name&appname=com.example.ourB";
    await launch(url);
  }

onMapTapped를 통해 mapLaunch가 호출되고, mapLaunch에서는 네이버지도 scheme으로 구성된 deep link를 통해 애플리케이션으로 연결됩니다.

이후 다시 NaverMap Widget이 있는 SubPage로 복귀했을 때, Naver Map영역에서 naver symbol과 내위치 버튼은 정상적으로 출력되지만, 지도가 출력되어야 할 영역은 검은 화면으로 나옵니다.
(애플리케이션을 처음 실행 후, Sub Page로 진입하는 경우에는 정상적으로 위젯이 나옵니다. Main Page로 pop한 이후에 다시 들어가도 정상적입니다.)

이 경우, #53 과 같은 경우라고 할 수 있을까요?

@note11g
Copy link
Owner

note11g commented Mar 30, 2023

새로운 이슈로 설정하겠습니다.

현재 이슈 파악중에 있습니다. 감사합니다.

@note11g note11g added bug Something isn't working 1.0 (deprecated label) 1.0 version's issue Android labels Mar 30, 2023
@note11g note11g changed the title NaverMap Widget 선언 시, onMapTapped를 통해 다른 앱으로 이동 후 복귀했을 시 지도가 black screen으로 덮이는 문제 Android에서 LifeCycle이 Changed될 경우, NaverMap이 정상적으로 표출되지 않는 문제 Mar 30, 2023
@note11g note11g changed the title Android에서 LifeCycle이 Changed될 경우, NaverMap이 정상적으로 표출되지 않는 문제 Android에서 LifeCycle이 Changed될 경우, NaverMap이 검은색으로 표출되는 문제 Mar 30, 2023
@note11g
Copy link
Owner

note11g commented Mar 30, 2023

#53 을 수정하는 과정에서, 잘못된 로컬 브랜치를 업로드하였습니다. (PR #61)
#61 의 수정사항이 완전히 반영되지 않아 발생하는 문제입니다.
바로 수정사항 적용하여 커밋하도록 하겠습니다. 감사합니다.

note11g added a commit that referenced this issue Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.0 (deprecated label) 1.0 version's issue Android bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants