---
title: "AddProtocolResponseData | JavaScript maps SDK"
description: "Documentation for MapTiler SDK"
---

> For AI agents: a documentation index is available at [/llms.txt](https://docs.maptiler.com/llms.txt). Markdown versions of all pages are available by appending .md to any URL.

# Type Alias AddProtocolResponseData

AddProtocolResponseData:  
    | ArrayBuffer  
    | [ImageBitmap](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.ImageBitmap/)  
    | [HTMLImageElement](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.HTMLImageElement/)  
    | string  
    | object

The `data` a protocol handler resolves with. Which member is expected follows `RequestParameters.type`:

-   `'arrayBuffer'`: an `ArrayBuffer`, for example a non-compressed pbf vector tile.
-   `'json'`: the parsed JSON value.
-   `'string'`: a string.
-   `'image'`: an `ImageBitmap` or `HTMLImageElement`, used as is, or an `ArrayBuffer` of encoded image bytes, which are decoded first. A handler that already holds decoded pixels should return them as an `ImageBitmap`, since encoding them only makes the library decode them again.
