Why MapView is not working
See original GitHub issueHi! 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:
- Created 5 years ago
- Comments:15 (6 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@TostF, you can download it from https://developer.here.com/develop/mobile-sdks
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