Select to view content in your preferred language

MosaicRule Error

1164
3
04-12-2011 11:25 AM
SteveLi
Emerging Contributor
I have following code to perform identify on MosaicDataSet.

var identifyParams:ImageServiceIdentifyParameters = new ImageServiceIdentifyParameters();
    identifyParams.geometry = event.mapPoint;
    identifyParams.mosaicRule = new MosaicRule();
    identifyParams.mosaicRule.where = "Name = 'WinTemp_1950_01'"

identifyTask.execute(identifyParams, new AsyncResponder(myResultFunction, myFaultFunction));


The code gives me error:

[RPC Fault faultString="Unable to complete  operation." faultCode="400" faultDetail="Invalid value for parameter 'mosaicRule'"]

I believe the issue is I have to initialize all members of MosaicRule.  I think this is a bug in Flex API.  Can someone confirm?

Thanks.
Tags (2)
0 Kudos
3 Replies
MehulChoksey
Esri Contributor
Yes this is a bug. This will be fixed in upcoming release.(2.3)
0 Kudos
SteveLi
Emerging Contributor
Yes this is a bug. This will be fixed in upcoming release.(2.3)


Thanks for the reply.

Is there a workaround?  what default value should I give to other members if I don't want to set them?

when is the 2.3 release?
0 Kudos
MehulChoksey
Esri Contributor
workaround would be create key-value pairs of the parameters that you want to set, Url encode it and then pass those along as queryparameters:

e.g.:
<esri:ArcGISImageServiceLayer url="http://myserver/ArcGIS/rest/services/Test/ImageServer?mosaicRule=%0A%7B%22mosaicMethod%22%3A%22esriM..." imageFormat="jpgpng" />
0 Kudos