Function resetRasterLayerTransparency

  • JMap.Map.resetRasterLayerTransparency

    Resets the raster layer transparency to its initial value as defined on the server

    Parameters

    • layerId: JId

      The JMap layer id

    Returns number

    the initial transparency value

    Throws

    Error if layer is not found or not a raster layer

    Example

    // Make raster layer id=3 transparent
    JMap.Map.setRasterLayerTransparency(10, 1)
    // Reset to its initial opacity
    JMap.Map.resetRasterLayerTransparency(3)