POST
|
Ilona, I moved my LocationDisplayManager intialization code to the onStatusChangedListener, as you are doing in your code. I was not able to get my hands on an S3 running 4.1.1, but I tested on a Moto X running 4.4.2, an S3 running 4.3, and a Motorola Razr HD running 4.1.2 On all of these devices, the functionality worked as expected. Sitting in my office with the location set to "device only", I get my custom location acquiring symbol. As I then walk outside, my symbol gets changed to my custom default symbol. I can get many location updates, and it never gets changed back to the pre-packaged blue/white symbols. I cannot seem to reproduce your issue. Can you try it on another device? I really doubt that the device is the problem, but I just want to eliminate another factor. It seems we have almost identical code, so I can't imagine what else the problem may be. Best regards, Michael EDIT: got ahold of an S3 running 4.1.2, still worked as expected on there as well.
... View more
03-20-2014
03:50 PM
|
0
|
0
|
458
|
POST
|
Ilona, May I ask what device you're using? And could you provide a code snippet where you're setting up the LocationDisplayManager? I performed my testing on a Moto X running Android 4.4. In case it may provide any assistance, I've pasted below my code snippet for my Activity, where I set up the LocationDisplayManager
public class HelloWorld extends Activity {
MapView mMapView;
LocationDisplayManager ldm;
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mMapView = new MapView(this);
mMapView.addLayer(new ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/arcgis/rest/services/World_Street_Map/MapServer"));
setContentView(mMapView);
try {
ldm = mMapView.getLocationDisplayManager();
PictureMarkerSymbol check = new PictureMarkerSymbol(this, getResources().getDrawable(R.drawable.checkmark));
PictureMarkerSymbol gps2 = new PictureMarkerSymbol(this, getResources().getDrawable(R.drawable.gps2));
ldm.setLocationAcquiringSymbol(gps2);
ldm.setDefaultSymbol(check);
ldm.setCourseSymbol(check);
ldm.start();
} catch(Exception e) {
e.printStackTrace();
}
}
@Override
protected void onPause() {
super.onPause();
mMapView.pause();
}
@Override
protected void onResume() {
super.onResume();
mMapView.unpause();
}
} Best regards, Michael
... View more
03-19-2014
08:37 AM
|
0
|
0
|
458
|
POST
|
Team Igal, I have tested this myself against our current release and it is working as expected. However, I believe I may be able to explain what you're experiencing. As far as location acquiring symbol, dependent on your surroundings, you may see this very seldomly. In my own testing, the easiest way to verify that my custom location acquiring symbol was indeed being used was to change the Location settings in the Android device to "Device only", as opposed to "High Accuracy". With "Device Only", ONLY the GPS sensor will be used, not the network / cell sensors. The reason "High Accuracy" is usually on by default is that the network / cell sensors can typically get you a very quick, albeit inaccurate fix. Then, once the GPS sensor has gotten a fix, you can get your much more accurate fix from that. However, if you turn it to "Device Only", and you start the application from within a building with no clear view of the sky, it can take a few minutes to get a GPS lock, and you can see the location acquiring symbol for this entire time. If at any point you take a step outside (if it's not too cloudy), you should almost immediately get a location lock and see it switch to the "default symbol". As for your second post... If you set the default symbol to a custom symbol, this should not be changing when you get a new fix. What you may be experiencing is our new logic of showing movement direction. Our standard blue dot with a white outline is the "default symbol", while the same icon with a small white arrow pointing straight up is our "course symbol" (what you would expect to see from navigating). By default, once you start moving, (i.e. the location update from Android's LocationManager has a speed and a bearing), we will use this bearing to rotate the course symbol to point in the direction you are actually moving, and that is displayed instead of the default symbol. Once you come to a stand still again, you should see the symbol revert back to the simple blue dot with white outline. If your desire is to only show one symbol regardless of your movement, then what you'll want to do is set your custom symbol in both "setDefaultSymbol" and "setCourseSymbol" Please let me know if this solves your problem! Best regards, Michael Adams
... View more
03-18-2014
03:59 PM
|
0
|
0
|
458
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|