We are visualizing a tiff image in our web map. We have set the layer properties to say that black pixels are to be treated as background, and that they should be displayed as transparent. Visualizing it in ArcGIS Desktop confirms that this is working properly. However, as soon as the layer is published and the layer is put into a ArcGISDynamicMapServiceLayer, the white pixels seem to become transparent. We cannot seem to identify the cause of this problem.
This is the code (SETTLE_VP_ORTHOPHOTO is a variable storing the rest endpoint for the layer.):
var VP_ortho = new ArcGISDynamicMapServiceLayer(SETTLE_VP_ORTHOPHOTO ,{
id: "VP_ortho",
visible: false
});
This is the service layer definition:
Layer: mos_VP_2.tif (ID: 0)
Name: mos_VP_2.tif
Display Field:Type: Raster Layer
Geometry Type: null
Description: Definition Expression: N/A
Copyright Text: Default Visibility: true MaxRecordCount: 0
Supported Query Formats: JSON, AMF, geoJSON
Min Scale: 0
Max Scale: 0
Supports Advanced Queries: false
Supports Statistics: false
Has Labels: false
Can Modify Layer: false
Can Scale Symbols: false
Use Standardized Queries: true
Extent:Spatial Reference: 102100 (3857)
Drawing Info:Advanced Query Capabilities:Supports Statistics: false
Supports Pagination: false
Supports TrueCurve: false
Supports Returning Query Extent: true
Supports Query With Distance: true
Supports Sql Expression: false
HasZ: false HasM: false Has Attachments: false
HTML Popup Type: esriServerHTMLPopupTypeNone
Type ID Field: null
Fields: None