AnsweredAssumed Answered

How to use setLayerDefs method for IdentifyParameters?

Question asked by lolob on Oct 8, 2014

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

Outcomes