Select to view content in your preferred language

How to use setLayerDefs method for IdentifyParameters?

2358
0
10-08-2014 08:52 PM
azzamwahab
Deactivated User

Hi,

According to Arcgis Android API, we can use setLayerDefs method in IdentifyParameters class to filter features of individual layers.

The method is public void setLayerDefs (Map<String, String> layerDefs)

However the method use in ArcGISDynamicMapServiceLayer class is different;

public void setLayerDefinitions(Map<Integer, String> layerDefs)

The different is the key; one accepts String and the other accepts Integer. My question is what value for key String? Is it the identify task url? Or null?

Below is a snippet of the code:

String q = "STATE LIKE 'ta%'";

HashMap<String,String> layerDefsIdentify = new HashMap<String,String>();

layerDefsIdentify.put(WHAT_IS_HERE,q);// I don't know

//Set Identify Parameters

params = new IdentifyParameters();

params.setTolerance(15);

params.setDPI(98);

params.setLayers(new int[]{0});

params.setLayerMode(IdentifyParameters.VISIBLE_LAYERS);

params.setLayerDefs(layerDefsIdentify); //calling the method here.

I would really appreciate it if someone could help me.

Thanks-lolobs

0 Kudos
0 Replies