How to see attributes fields associated with a layer from my published map service?

1500
2
Jump to solution
08-16-2012 10:47 AM
JohnAllen
New Contributor III
I'm new to this...bear with me.

I'm trying to view the attributes associated with my published map service layer.
There is only one layer within my published map service.

I first call on ESRI's ArcGISTiledMapServiceLayer.
Then I call on my ArcGISDynamicMapServiceLayer.
See picture.

package com.dhec.MPOS;  import com.esri.android.map.MapView; import com.esri.android.map.ags.ArcGISDynamicMapServiceLayer; import com.esri.android.map.ags.ArcGISTiledMapServiceLayer;  import android.app.Activity; import android.os.Bundle;  public class PopUp extends Activity {   MapView map = null;     /** Called when the activity is first created. */          public void onCreate(Bundle savedInstanceState) {   super.onCreate(savedInstanceState);          setContentView(R.layout.popup);    // Retrieve the map and initial extent from XML layout   map = (MapView) findViewById (R.id.popup);           //Layer 0 - Called first   map.addLayer(new ArcGISTiledMapServiceLayer("http://services.arcgisonline.com/ArcGIS/rest/services                           World_Street_Map      /MapServer"));   //Layer 1 - Called second   map.addLayer(new ArcGISDynamicMapServiceLayer("http://TEST/ArcGIS/rest/services/Mobile/MPOS/MapServer"));             } }


The code that should come next is what's confusing me.
I know I need some sort of onSingleTapListener or something to initiate the process, then I want my fields associated with the layer to appear.

Which do I use? (I just want a default window to appear.)

1. IdentifyTask?
2. Callout?
3. PopupContainer?
ect...

Can someone post some basic code or point me in the right direction.
I feel like this is simple.

Thanks.
0 Kudos
1 Solution

Accepted Solutions
JohnAllen
New Contributor III
Follow up.....

It was easier than I thought. Here is what I did.

I chose to use the: Pop-up function

I created a web-map service (Map Server) of my GIS layer using ArcMap/ArcGIS Server.

Then I went to arcgisonline.com and created a new webmap and added my map service layer.

Added Link: Your'>http://Your server/ArcGIS/rest/services/Mobile/MPOS/MapServer/0

Saved my map and then made it available to the public. (If you don't make it available to the public it won't show up in your app.)

I copied my webmap link from the top of my web browser and pasted in the sample code (PopupInWebMapForViewing).

Webmap Link: http://www.arcgis.com/home/item.html?id=ec84873333cf4d7f8e12lnc34fd677
(Not the actual link)

I didn't change anything in ESRI's (PopupInWebMapForViewing) sample code, except for the Webmap Link to my web map I created.

// Load a webmap.
    map = new MapView(this, "http://www.arcgis.com/home/item.html?id=ec84873333cf4d7f8e12lnc34fd677", "", "");
    setContentView(map);


This video helped me understand the work flow: http://resources.arcgis.com/en/communities/runtime-android/video1207.htm

Phone: Droid Bionic with Ice Cream Sandwich.

Hope this helps.

View solution in original post

0 Kudos
2 Replies
JohnAllen
New Contributor III
Follow up.....

It was easier than I thought. Here is what I did.

I chose to use the: Pop-up function

I created a web-map service (Map Server) of my GIS layer using ArcMap/ArcGIS Server.

Then I went to arcgisonline.com and created a new webmap and added my map service layer.

Added Link: Your'>http://Your server/ArcGIS/rest/services/Mobile/MPOS/MapServer/0

Saved my map and then made it available to the public. (If you don't make it available to the public it won't show up in your app.)

I copied my webmap link from the top of my web browser and pasted in the sample code (PopupInWebMapForViewing).

Webmap Link: http://www.arcgis.com/home/item.html?id=ec84873333cf4d7f8e12lnc34fd677
(Not the actual link)

I didn't change anything in ESRI's (PopupInWebMapForViewing) sample code, except for the Webmap Link to my web map I created.

// Load a webmap.
    map = new MapView(this, "http://www.arcgis.com/home/item.html?id=ec84873333cf4d7f8e12lnc34fd677", "", "");
    setContentView(map);


This video helped me understand the work flow: http://resources.arcgis.com/en/communities/runtime-android/video1207.htm

Phone: Droid Bionic with Ice Cream Sandwich.

Hope this helps.
0 Kudos