|
POST
|
I tried to reproduce the issue you described, leaving the map in autopan Navigation mode, and moving between signal and no-signal areas, but I found when I returned to an area of signal, and started getting location updates again, the map updated. Are you sure this is not a different case of accidentally catching the map, meanving some navigation is done and then the auto-pan mode is turned to OFF again? And does your LocationDisplayManager.LocationListener.onLocationChanged still get called with location updates? Perhaps you can add yourself a test button that checks the mode, and re-set that if it's turned to off, and also try checking the LocationDisplayManager isStarted remains true as well. If you are still finding your problem, maybe you can try stopping and re-starting the LocationDisplayManager.
... View more
08-05-2014
08:00 AM
|
0
|
1
|
616
|
|
POST
|
In the sample code, the value of zoomToWidth would only change if the accuracy of the GPS location changes; if I change the factor from 50 to 200 or 10 for example, I see this reflected in the map scale when the location initially changes. One thing that might be worth checking is that you map is initialized before you attempt to change the extent, and also make sure that your setExtent call is not conflicting with any specific zoom level or extent set when you create your MapView, maybe in the layout XML if you're using maptions in that. If you're having specific issues with setExtent not working it may be best if you started a new thread, and post some code that reproduces the specific problem. The SpatialReference is used to project the Point from the spatial reference of the location point (WGS 84) to the map spatial reference - by default the spatial reference of the map, if using the Esri basemaps, would be WGS 1984 Web Mercator Auxiliary Sphere. You can find a list of all spatial references at these locations - this shows the codes (like 4326) along with the definition of the : Mobile projected coordinate systems—ArcGIS Runtime SDK for Android | ArcGIS for Developers Mobile geographic coordinate systems—ArcGIS Runtime SDK for Android | ArcGIS for Developers If you're developing applications with spatial data but are not familiar with spatial references, coordinate systems, projections and the like, it is worth familiarising yourself with these concepts.
... View more
07-30-2014
03:52 AM
|
0
|
0
|
616
|
|
POST
|
This looks to be an error to do with OpenGL. In the System Requirements topic of the Guide there's details on the OpenGL requirements - System requirements for 10.2.3—ArcGIS Runtime SDK for Android . As per previous suggestions on the forums you might want to check your emulator setup is appropriate, as described in the blog article originally here ArcGIS Runtime SDK for Android v1.1 supports Android Emulator | ArcGIS Blog and more up to date SDK information here Setting up the Android Emulator for ArcGIS Android development | ArcGIS Blog.
... View more
07-24-2014
06:38 AM
|
0
|
1
|
459
|
|
POST
|
Hi Thom, As far as I know, autoPanMode will pan, but it will not zoom, so perhaps you can set the zoom level you wish to use before you start the navigation? One way to do this automatically might be to set the AutoPanMode to OFF, set the LocationListener, and start() the LocationDisplayManager. Then just in the first call to onLocationChanged, set the zoom level there, and then switch the AutoPanMode to NAVIGATION. I've added some code as an example below. Also I will make a note that we could add a sample to demonstrate navigation auto-pan mode, along with the initial zoom in, to the SDK.
mLocationDisplayManager = mMapView.getLocationDisplayManager();
mLocationDisplayManager.setAutoPanMode(AutoPanMode.OFF);
mLocationDisplayManager.setLocationListener(new LocationListener() {
boolean locationChanged = false;
@Override
public void onLocationChanged(Location location) {
if (!locationChanged) {
Point currentPt = new Point(location.getLongitude(), location.getLatitude());
Point currentMapPt = (Point) GeometryEngine.project(currentPt, SpatialReference.create(4326), mMapView.getSpatialReference());
// Use a suitable value for the typical app usage for when no accuracy is available.
float accuracy = 100;
if (location.hasAccuracy()) {
accuracy = location.getAccuracy();
}
// Convert the accuracy to units of the map, and apply a suitable zoom factor for the app.
Unit mapUnits = mMapView.getSpatialReference().getUnit();
double zoomToWidth = 50 * Unit.convertUnits(accuracy, Unit.create(LinearUnit.Code.METER), mapUnits);
Envelope zoomExtent = new Envelope(currentMapPt, zoomToWidth, zoomToWidth);
// Make sure that the initial zoom is dont WITHOUT animation, or it may interfere with autopan.
mMapView.setExtent(zoomExtent, 0, false);
// Dont run this again.
locationChanged = true;
// Now switch to navigation mode.
mLocationDisplayManager.setAutoPanMode(AutoPanMode.NAVIGATION);
}
}
@Override
public void onProviderDisabled(String provider) {
}
@Override
public void onProviderEnabled(String provider) {
}
@Override
public void onStatusChanged(String provider, int status, Bundle extras) {
}
});
mLocationDisplayManager.start();
... View more
07-24-2014
02:27 AM
|
2
|
6
|
1723
|
|
POST
|
If you're seeing the GPS updates on the map, first thing I would check is that you're not touching the map at all after the auto-pan is set - auto-panning is automatically turned off if the user interacts with the map and changes the extent manually (zooming or panning) or if the extent is changed programmatically - check getAutoPanMode(), and also worth checking that the location updates started correctly, using isStarted().
... View more
07-23-2014
09:37 AM
|
0
|
8
|
1723
|
|
POST
|
Hi Oscar, If you have the correct imports statements, then it sounds likely that you don't have the Jar files in your build path that contain all the Esri classes - you can add these automatically if you have the ArcGIS Runtime SDK for Android installed in Eclipse - right-click the project and choose ArcGIS Tools -> Convert to ArcGIS Android Project. If that's option is disabled, maybe your project already had this reference but it's been broken somehow, so in that case choose Fix Project Properties instead. The doc here will tell you more about this: Integration features—ArcGIS Runtime SDK for Android. Hope this helps,
... View more
07-23-2014
01:24 AM
|
0
|
0
|
1121
|
|
POST
|
If you are building a map with the MapView from the ArcGIS Runtime SDK for Android, then you can use the LocationDisplayManager to set the map to automatically pan in navigation mode. See the LocationDisplayManager class: use the setAutoPan method and set the mode as NAVIGATION, and use the start method to start the auto-panning behaviour. There are differerent auto-pan modes - see the Nearby Sample for an example of using the LOCATION mode in an app.
... View more
07-22-2014
03:46 AM
|
1
|
11
|
1723
|
|
POST
|
You could try getting the rectangular extent of the Polygon, using queryEnvelope(Envelope), and then you can call getCenter() on that Envelope. There's no getCenter() on Polygon, so understandable to miss this I think.
... View more
07-02-2014
12:34 AM
|
0
|
0
|
642
|
|
POST
|
There's a few samples you might find useful - you can try out the Nearby sample to see how the LocationDisplayManager is used to set a LocationListener to get onLocationChanged callbacks that give you GPS updates: https://developers.arcgis.com/android/sample-code/nearby/ You might find the AddCSV2GraphicsLayer sample useful to show you how to add a series of x,y coordinates to a GraphicsLayer in a map - in this case you can see the coordinates are coming from a CSV file, so you'd need to take this and change it to work with your GPS coordinates instead: https://developers.arcgis.com/android/sample-code/addcsv-file/ Hopefully these two should give you some pointers, depending on what you actually want to do with the GPS locations.
... View more
06-26-2014
01:28 AM
|
0
|
0
|
666
|
|
POST
|
Hi, It sounds to me like you may have imported the wrong Point class, there is a number of Point classes around in standard libraries. Check the imports at the top of your class file, you might find you have: import android.graphics.Point; Delete that one (assuming you're not using this Android graphics point elsewhere), and replace it with the ArcGIS Runtime SDK for Android Point class import, using a statement like this: import com.esri.core.geometry.Point; And then go back to your Point class declaration and you should find you now have different constructors for your Point, and the x, y parameters will be doubles. Its easy to accidentally add the wrong imports sometimes, and different IDEs have different shortcuts and commands to automate adding the imports. Hope this helps,
... View more
06-25-2014
12:46 AM
|
0
|
0
|
666
|
|
POST
|
From what I know, the information about how to handle no data tiles is needed at layer initialization time, before more tile requests are sent, so that an appropriate handler can be set for every subsequent genuine tile request. If the no data tile were not assessed in advance, more work would need to happen on every genuine tile request, which would obviously impact efficiency. Having said that, I wouldn't expect the initial request to be a lengthy operation, it happens only once per layer initialization, and I would not expect this to surface to the end user in any way including with any perceptible delay in layer initialization - so if you are finding that end users are aware of this specific request in any way (not just from LogCat), then let us know. Thanks,
... View more
06-17-2014
12:58 AM
|
0
|
0
|
489
|
|
POST
|
Hi, I understand that is the first request to a service based on a tiled layer - information in the response allows allows the MapView to work out what to show for missing tiles in that specific tiled layer - some services have a specific 'no data' tile to show, whereas others return a 404 error for a missing tile. The MapView can then work out which option it's dealing with. Hope this helps some,
... View more
06-10-2014
12:29 AM
|
0
|
0
|
489
|
|
POST
|
I'm afraid there is no way (within the SDK) to tilt the map - there is no concept of a camera position in the SDK, as the map is purely a 2D map, not '2.5D' or 3D. I am not aware of any workarounds.
... View more
05-29-2014
02:05 AM
|
0
|
0
|
1061
|
|
POST
|
Possibly the reply I posted to this other thread may help with these questions: http://forums.arcgis.com/threads/110326-onPanListener-issues-after-sdk-update-from-10.1.1-to-10.2.3?p=390710&posted=1#post390710
... View more
05-22-2014
02:38 AM
|
0
|
0
|
663
|
|
POST
|
Hi Keith, I think you may need a combination of things - you can use the MapOnTouchListener.onTouch and listen to ACTION_UP to cover normal panning, and also pinch-zooming, and rotating using a gesture (if you have that enabled). However, there's also the built-in gestures single-pointer-double-tap to zoom in, and double-finger-single-tap to zoom out, and these actions will animate the extent change after the tap event. Additionally, there's the fling gesture (mentioned in this other recent post - http://forums.arcgis.com/threads/109811-Best-way-to-figure-out-when-user-stops-panning), which also animates the map to it's eventual extent, after the gesture is done. So I would go for a combination of updating the label after the ACTION_UP in onTouch, and then additionally at a period of time after MapOnTouchListener.onFling, onMultiPointersSingleTap, and onDoubleTap. I do not have a set time period that I know would work, but 1500 milliseconds has been used by others effectively. And then additionally if you change the map extent programmatically, bearing in mind again that map animations may be triggered by various methods (most methods that change map extent now default to using animation). We've worked to improve the documentation on what methods will be triggering animation by default, and this should be available in the next release, but hopefully before that too. Sorry it's not a simpler answer, let me know if this helps, and if you find any other cases to consider.
... View more
05-22-2014
02:37 AM
|
0
|
0
|
747
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-03-2024 10:08 AM | |
| 1 | 01-02-2024 08:09 AM | |
| 1 | 11-07-2023 01:44 AM | |
| 1 | 08-03-2018 03:54 AM | |
| 1 | 03-07-2017 02:12 AM |