Select to view content in your preferred language

Create definition query for image service

92
1
Jump to solution
Tuesday
mody_buchbinder
Occasional Contributor III

I am trying to add an image service with query def.

In case of the feature layer it is part of the FeatureLayerCreationParameters but not in the Mosaic or Raster parameters.

I wrote the code below, did not return any error but did not added the query.

Using the debugger the value of the image layer definition query does not changed after the line that should change it.

Thanks

 

            var map = MapView.Active.Map;
            string Url = "https://ags111.stltd.co.il/arcgis/rest/services/mos1/ImageServer";
            QueuedTask.Run(() =>
            {
                var rasterCreationParams = new RasterLayerCreationParams(new Uri(Url));
                rasterCreationParams.Name = "modylayer";
                ImageServiceLayer imageServiceLayer =
                          LayerFactory.Instance.CreateLayer<BasicRasterLayer>(rasterCreationParams, map) as ImageServiceLayer;
                imageServiceLayer.SetDefinitionQuery("OBJECTID = 1");     
            });

 

0 Kudos
1 Solution

Accepted Solutions
GKmieliauskas
Esri Regular Contributor

Hi,

Have you seen that thread?

View solution in original post

0 Kudos
1 Reply
GKmieliauskas
Esri Regular Contributor

Hi,

Have you seen that thread?

0 Kudos