question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Why MapView is not working

See original GitHub issue

Hi! Can anyone tell me why I need to set Map on MapView in order to set Map parameters like zoom or center?

private fun initMap() {
         MapEngine.getInstance().init(context) { error ->`
            when (error) {
                NONE -> {
                    map = Map()
                    mapView.map = map
                    map.setCenter(GeoCoordinate(51.919438, 19.145136), Animation.NONE)
                    map.zoomLevel = map.minZoomLevel + map.maxZoomLevel / 2
                }
                else -> context?.showToast(R.string.error_map_init)
            }
        }
    }

When I switch position of mapView.map = map and move it below map.zoomLevel my init is crashing with Attempt to invoke interface method 'void com.here.android.mpa.internal.br.c()' on a null object reference. Can you explain me how this is the case? Is setting map on MapView makes MapEngine somehow load data? Unfortunately the code is obfuscated and I cannot reverse-engineer it :C

Thanks for help!

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
starandcommented, Dec 6, 2018
0reactions
TostFcommented, Dec 6, 2018

Conversion to offline map is too big of a hassle as of now. Seems like I’m getting locked by lots of errors to features I don’t need at all. Closing this thread because it became to big waste of time to dig into this. Thanks for help @Merlin1stHere

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Map View is not loading content - Stack Overflow
But having MapView part of layout file causes issue as onCreate called before inflating fragments layout [So MapView's onCreate() never be called].
Read more >
Mapview not working · Issue #231 · r-spatial/mapview - GitHub
I have code that I've used with the mapview() function hundreds of times in ... I have no problems with running mapview on...
Read more >
MapView - Expo Documentation
MapView. react-native-maps provides a Map component that uses Google Maps on Android and Apple Maps or Google Maps on iOS. No additional setup...
Read more >
MapView | API Reference | ArcGIS Maps SDK for JavaScript ...
A MapView may not be immediately ready for display after it has been constructed. For example, map data may need to be loaded...
Read more >
WatchOS2 + MapView not working? | Apple Developer Forums
Been using mapView loads in WatchOS 1 with no problems but suprised to hit such a fundamental stumbling block beofore i've even got...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found