Here maps view goes black when app go in background

619 views Asked by At

I have recently started using here maps api, and i have encountered some difficulties implementing maps. When app goes in background and i come back to app, map view screen is black. I should mention that i'm using MapView and not MapFragment. MapView is inside fragment view. Beside that map is showing clearly.

mapView.setMap(mMap);

        mMap = mapView.getMap();
        mMap.setZoomLevel(16);

        mapMarker = new MapMarker();
        mapMarker.setTitle("Neki naslov");
        mapMarker.setDescription("Neki opis");
        mapMarker.setDraggable(true);

        mapView.setMapMarkerDragListener(mOnDragListener);

        mapMarker.setCoordinate(PositioningManager.getInstance().getLastKnownPosition().getCoordinate());
        mMap.addMapObject(mapMarker);
        mapMarker.showInfoBubble();

        mMap.setCenter(PositioningManager.getInstance().getLastKnownPosition().getCoordinate(),
                Map.Animation.NONE);
1

There are 1 answers

12
David Leong On

Most likely, you did not call MapView#onResume() and MapView#onPause() as part of the activity / fragment life cycle. If it is not called, the underlying rendering thread will not be resumed.

@Dusan, your code does not have an image for the marker, so there is no marker to show.