POST
|
I'm running api 22 android 5.1.1. i think i found the issue. when i set Auto Pan Mode on its calling onLocationChanged with no actual location data. So when i get the location point and try doing anything with it, it crashes. it should not call on onlocationchanged if there is no location.
... View more
03-17-2017
06:08 AM
|
0
|
0
|
510
|
POST
|
i think the issue is: if you try and change autopanmode before you ever get a location update it will crash.
... View more
03-15-2017
08:58 AM
|
0
|
2
|
510
|
POST
|
I have location services turrn off (for testing). When i display the map i make these calls. locationDisplay = mMapView.getLocationDisplay();
locationDisplay.setLocationDataSource( new AndroidLocationDataSource( App.getCurrentActivity(), LocationManager.NETWORK_PROVIDER, 5000L, 1 ) );
locationDisplay.setAutoPanMode( LocationDisplay.AutoPanMode.OFF );
locationDisplay.startAsync();
locationDisplay.addLocationChangedListener( this );
then there is a button that will allow the user to start navigation mode between 2 points.
then i turn on auto pan.
locationDisplay.setAutoPanMode( LocationDisplay.AutoPanMode.NAVIGATION ); this line crashes on me hard.
... View more
03-15-2017
08:27 AM
|
0
|
0
|
510
|
POST
|
this is crashing my application when i set AutoPanMode and gps on the device is turned off. locationDisplay.setAutoPanMode( LocationDisplay.AutoPanMode.NAVIGATION ); I first set autopanmode off locationDisplay.setAutoPanMode( LocationDisplay.AutoPanMode.OFF );
and then allow the user to resume functions and if location services is off the app crashes.
how do i catch this or prevent this (without saying turn location services on).
I tried checking locationDisplay.isStarted()
but this passes and the app still crashes.
03-14 15:03:54.934 11143-11143/cmdpoint.org A/art: sart/runtime/check_jni.cc:65] JNI DETECTED ERROR IN APPLICATION: JNI NewLocalRef called with pending exception 'java.lang.NullPointerException' thrown in unknown throw location
03-14 15:03:54.934 11143-11143/cmdpoint.org A/art: sart/runtime/check_jni.cc:65] in call to NewLocalRef
03-14 15:03:54.934 11143-11143/cmdpoint.org A/art: sart/runtime/check_jni.cc:65] from void com.esri.arcgisruntime.internal.jni.CoreLocationDisplay.nativeSetAutoPanMode(long, int)
03-14 15:03:54.934 11143-11143/cmdpoint.org A/art: sart/runtime/check_jni.cc:65] "main" prio=5 tid=1 Runnable
... View more
03-14-2017
01:07 PM
|
0
|
5
|
1207
|
POST
|
I'm trying to display a mmpk map. I get some of the details but i'm not getting the details from the layers with in the mmpk. there are about 7 layers in this file. here is the code to make sure these are visible. I'm doing this within a addDoneLoadingListener when the map is loaded. LayerList llist = mMap.getOperationalLayers();
for (int i = 0; i < llist.size(); ++i)
{
FeatureLayer featureLayer = (FeatureLayer)llist.get( i ) ;
if(featureLayer != null)
{
featureLayer.setLabelsEnabled(true);
featureLayer.setVisible( true );
}
} Any suggestions on what might be wrong. Note this was my first attempt: for (int i = 0; i < llist.size(); ++i)
{
llist.get( i ).setVisible( true );
}
... View more
02-23-2017
07:00 AM
|
0
|
0
|
791
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|