mapspeople / mapsindoorsandroid Goto Github PK
View Code? Open in Web Editor NEWMapsIndoors Standard App for Android
License: MIT License
MapsIndoors Standard App for Android
License: MIT License
Unable to add place id for my custom location. Can you please guide me how can I add my place or building instead of some fix places by you.
Hi,
I've tried to install the app for testing, but had a few issues:
It complained about a img for the splash screen; I've solved this deleting all references for this image
Now it doesn't find the class PositionProviderAggregator, from package com.mapsindoors.stdapp.positionprovider and looks like this is a class I can't just throw away
please let me know if I did something wrong
Regards
I'm using play-services-maps:17.0.1
and mapsindoorssdk:3.8.2
on Android 11.
I'm having troubles understanding the lifecycle of MapControl
. I have a Fragment
in an Activity
with a BottomNavigationView
, this Fragment is a root fragment. The layout contains a MapView
.
In the Fragment I'm creating the MapControl
instance in onCreate()
. I'm calling all the corresponding lifecycle functions like onPause
, onStop
and I'm calling onDestroy
in the fragment's onDestroy()
method.
I can select that tab and the map loads and I can navigate away and the fragment gets created and destroyed properly and everything seems to work. If however I select the same tab again, the BottomNavigationView simply navigates to the root, so it creates another instance of the Fragment and replaces the previous one. The lifecycle calls are as follows:
D/MapFragment: onPause (A)
D/MapFragment: onStop (A)
D/MapFragment: onCreate (B)
D/MapFragment: onViewCreated (B)
D/MapFragment: onStart (B)
D/MapFragment: onMapReady (B)
D/MapFragment: init ready (B)
D/MapFragment: onDestroyView (A)
D/MapFragment: onDestroy (A)
D/MapFragment: onResume (B)
As you can see, at some point two fragments are created, and thus two instances of MapControl
, and towards the end A's MapControl.onDestroy()
is called, while Fragment B is on its way to be onResumed()
. The crash shortly after this is:
java.lang.IllegalStateException: MPTileManager not initialized
at com.mapsindoors.mapssdk.bd.a(SourceFile:50)
at com.mapsindoors.mapssdk.MapControl.i(SourceFile:1272)
at com.mapsindoors.mapssdk.MapControl.lambda$ZX8O3Ril9ls7u4dd5Y-EAazNVMU(Unknown Source:0)
at com.mapsindoors.mapssdk.-$$Lambda$MapControl$ZX8O3Ril9ls7u4dd5Y-EAazNVMU.onFloorSelected(Unknown Source:2)
at com.mapsindoors.mapssdk.MapControl$4.onFloorSelected(SourceFile:2593)
at com.mapsindoors.mapssdk.y$1.onFloorSelectionChanged(SourceFile:247)
at com.mapsindoors.mapssdk.MPDefaultFloorSelector$1.onFloorSelectionChanged(SourceFile:260)
at com.mapsindoors.mapssdk.x.a(SourceFile:122)
at com.mapsindoors.mapssdk.MPDefaultFloorSelector.setSelectedFloor(SourceFile:3133)
at com.mapsindoors.mapssdk.y.b(SourceFile:232)
at com.mapsindoors.mapssdk.MapControl.a(SourceFile:34130)
at com.mapsindoors.mapssdk.-$$Lambda$3hb4avGSsp4gi7bhey3dcNt2N9g.onBuildingFoundAtCameraTargetListener(Unknown Source:2)
at com.mapsindoors.mapssdk.MapControl.a(SourceFile:50717)
at com.mapsindoors.mapssdk.MapControl.lambda$t-HamEMeFNntxRJWaMWTjyvnhYk(Unknown Source:0)
at com.mapsindoors.mapssdk.-$$Lambda$MapControl$t-HamEMeFNntxRJWaMWTjyvnhYk.onVenueFoundAtCameraTargetListener(Unknown Source:2)
at com.mapsindoors.mapssdk.MapControl.a(SourceFile:3709)
at com.mapsindoors.mapssdk.MapControl.b(SourceFile:1477)
at com.mapsindoors.mapssdk.MapControl.D(SourceFile:1253)
at com.mapsindoors.mapssdk.MapControl.lambda$cAhyURrfd3euk6HAjCamFVWCM7c(Unknown Source:0)
at com.mapsindoors.mapssdk.-$$Lambda$MapControl$cAhyURrfd3euk6HAjCamFVWCM7c.onCameraIdle(Unknown Source:2)
at com.google.android.gms.maps.zzx.zzb(com.google.android.gms:play-services-maps@@17.0.1:1)
at com.google.android.gms.maps.internal.zzo.zza(com.google.android.gms:play-services-maps@@17.0.1:1)
at com.google.android.gms.internal.maps.zzb.onTransact(com.google.android.gms:play-services-maps@@17.0.1:3)
at android.os.Binder.transact(Binder.java:1079)
at dr.aZ(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (150408-0):2)
at com.google.maps.api.android.lib6.impl.ac.a(:com.google.android.gms.dynamite_mapsdynamite@[email protected] (150408-0):2)
I know that MapControl
keeps track of how many instances are created as it would not allow me to create more than two instances. So there certainly is room for race conditions due to global state.
Am I using MapControl
correctly, or am I meant to make it a singleton? How would the limitation of only two instances work if I wanted to add those fragments into the back stack?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.