Hot answers tagged

12

Almost all of the web maps use a Web Mercator (Auxiliary Sphere) projection (WKID 3857). The parameters represent the coordinates for the edges of the viewing window. For example, were the coordinate system WGS84, the envelope for displaying the whole earth would have the following parameters: XMin: -180 XMax: 180 Ymin: -90 YMax: 90 The reason the ...


9

Build your application with the ArcGIS Android SDK - http://resources.arcgis.com/content/arcgis-android/sdk Requires Android version 2.2 (Froyo) and above. The ArcGIS app will only run on an Android emulator running the 4.0.3 system image with hardware accelaratin enabled. The ArcGIS for Android application has been designed for Android ...


4

The Basic algorithm is as follows: Geocode the two addresses to get the position for both of them. Pass these two points to a Network Analyst Service, and get the result from them. If you want to stick to the ESRI stack, ArcGIS Online has Geocoding, as well as Network Analyst services available. In the OpenSource Stack, you have several options like ...


4

You could use the "Collector for Android" app - http://blogs.esri.com/esri/arcgis/2013/01/16/operations-dashboard-and-collector-for-arcgis-released/ Or write your own application using the ArcGIS Runtime SDK for Android - http://resources.arcgis.com/en/communities/runtime-android/ In either case, you wouldn't need ArcGIS for Server, but could instead use ...


4

Those coordinates are likely from a projected coordinate system and are in meters, though I could be wrong. Coordinate reference systems is a huge topic of which if got wrong has massive consequences - so you should understand at least the principles. Morten Nielsen did a good introduction on his blog: http://www.sharpgis.net/post/2007/05/Spatial-...


3

I am unable to reproduce your issue on Mac or Win. But here are some things to confirm to ensure your settings are correct: SDK Manager Ensure ARM EABI v7a System Image is installed for the SDK you are targeting. Remember you must use Android 4.0.3 (API 15) or higher. AVD Emulator Choose a device based on Android 4.0.3 or higher. Choose ARM (...


3

Are you using a geoprocessing service or are you trying to use the NAServer endpoints? If you are trying to use the NAServer endpoints, I do not see any tasks for Route, ServiceArea, etc. in the API. I do see a gp task, but you will need to be working with a geoprocessing service to be able to use it with the API, not a NAServer service.


3

You need to apply the geographic transformation too. In the 10.2.5 API, project has several versions. You're going to have to switch to one that uses a Geometry and supports a GeographicTransformation instead like: public static Geometry project (Geometry geometry, SpatialReference inputSR, SpatialReference outputSR, GeographicTransformation tx) For the ...


2

MapView.getSpatialReference().getUnit() returns the units of the MapView, which the polygon on the map inherits. You can write a switch statement to handle the conversion to meters from the various units, or perhaps the GeometryEngine.project method will help.


2

I'm not overly familiar with the Android API but I am wondering if GeometryEngine.geodesicLength might be an easier approach. GeometryEngine.geodesicLength javadoc


2

If you don't mind a 3rd party app, you could try Arc2Earth Sync It will connect to Fusion Tables on your account's behalf and make it look like an ArcGIS Feature service. It can also use your ArcGIS.com credentials to create/update web maps so your FT tables show up automatically in the ArcGIS iOS/Android apps (or any of the ArcGIS Online apps/apis). Check ...


2

If you have started with the Hello World Map sample, then your map will be in Web Mercator projection (Spatial Reference ID 102100 3857). To place your data on it you will have to reproject from WGS 1984 coordinates (Spatial Reference ID 4326). To display your WGS 1984 on a Web Mercator map, you can use the GeometryEngine: SpatialReference webSR = ...


2

The problem was that we need to set the spatial reference of the naFeatures that we were sending. Hence naFeatures.setSpatialReference(mMapView.getSpatialReference()); solved the problem!


2

If it turns out I cannot share this information then I will remove the link; furthermore, the section Access and Use Constraints should address anyone's concerns. Here is the application code for the Water Service application showcased in the video from the above post titled DS2011: Introduction to ArcGIS API for Android.


2

First, try setting the distance to 50 locator.reverseGeocode(mapPoint, 50);. The PlaceSearch sample already does the specific feature you are trying to implement. The current implementation geocodes the address, or place, in the edit text field after you hit the Go button. Then when you click on the blue graphic representing the result a callout appears ...


2

The reason why the app runs when you comment out the mMapView.addLayer(tileLayer) is that the MapView's basemap is set in XML. Open up the /res/layout/main.xml file and comment out all the mapoptions parameters. Your XML should look like this: <!-- MapView layout, including basemap layer, initial center point, and zoom level --> <com.esri....


2

Your are not loading the *.jar dependencies in your build: dependencies { // local binary dependency compile fileTree(dir: 'libs', include: ['*.jar']) } We now have EAP release of ArcGIS Runtime SDK for Android samples here and the v10.2.3 EAP library module here


2

Get the geometry from the Graphic with getGeometry(). If Geometry.isPoint() returns true you can get the X and Y coordinate of the point with Point.getX() & Point.getY() respectively. To get a lat/lon you will need to ensure you have the correct projection. Your route code uses the GeometryEngine to reproject the point so after your conversion you ...


2

Your issue is with the service url string, you don't need the ? appended at the end: // set up the wms url wmsURL = "http://wms.openweathermap.org/service"; wmsLayer = new WMSLayer(wmsURL); wmsLayer.setImageFormat("image/png"); // available layers String[] visibleLayers = {"clouds", "precipitation"}; wmsLayer.setVisibleLayer(visibleLayers); wmsLayer....


2

I would extract out the basemap in the form as MBTiles, see the Android SDK link below: Local MBTiles


2

Coded Value Domain represents details from a FeatureLayer. This differs from a ArcGISTiledMapServiceLayer as feature services are composed of features with geometry and attributes. Features in a FeatureLayer can be displayed on a map, queried, edited, and selected. You can get the CodedValueDomain from a FeatureTable in a FeatureLayer from a Feature ...


2

Once you have successfully authenticated the app will create the credentials file for you and allow you the option to use the the save credentials the next time you open the app. To authenticate: Log into ArcGIS Developers Site Click the applications button in the upper right corner Register a New Application Copy the Client ID from your newly registered ...


1

It appears you have issues with the ArcGIS Runtime for Android. Could you provide information as to whether you have it installed and configured correctly. If not please use this link (http://www.esri.com/apps/products/download/index.cfm?fuseaction=download.all) to download and configure the ArcGIS runtime for Android (I have mine installed for eclipse) and ...


1

Yes, you can set the anchor point using the MarkerSymbol.setOffsetX and MarkerSymbol.setOffsetY. symbol1 = new PictureMarkerSymbol(image); symbol1.setOffsetX(8); symbol1.setOffsetY(8);


1

What you want is to get featureinfo from a wms layer. This done using an operation called getfeatureinfo. This operation is not always enabled: this depends on your server. You can check whether your server supports this by running a getCapabilities request. This is an obliged operation for a wms service. http://localhost:8080/geoserver/wms? service=wms&...


1

Where are you native libs? To compile the *.jar files from your libs folder add the following to your dependencies: // local binary dependency compile fileTree(dir: 'libs', include: ['*.jar']) The best way to work with the ArcGIS Android SDK is to update to v10.2.3 and use our Android SDK EAP library module from Github in your project. We have an EAP ...


1

If you are not interacting with the map or have the need to update the map image you can use the ArcGIS Server REST API to fetch the image. Example returning a JSON object http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/export?bbox=-185.3,-28.8,-59.5,118.1&f=json The response should look similar to ...


1

The issue is in the return from the LocatorReverseGeocodeResult. Make the following edit to the address string: address.append(String.format("%s\n%s, %s %s", addressFields.get("Address"), addressFields.get("City"), addressFields.get("Region"), addressFields.get("Postal"))); More information about what is returned from ...


1

I added a KMLLayer to the HelloWorld sample that comes with the ArcGIS Android SDK. public class HelloWorld extends Activity { private String url = "http://code.google.com/apis/kml/documentation/us_states.kml"; MapView mMapView = null; ArcGISTiledMapServiceLayer tileLayer; /** Called when the activity is first created. */ @Override public void onCreate(...


1

Download the shapefile to the device. Make sure that your app has permission to read files from your storage: <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> (having permission to write implicitly grants you this permission) Then, do something like: try { ShapefileFeatureTable shapefileFeatureTable = new ...



Only top voted, non community-wiki answers of a minimum length are eligible