> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kinetica.com/llms.txt
> Use this file to discover all available pages before exploring further.

# wms_request

### wms\_request

<ul>
  <li>
    wms\_request(\
    &#x20;request: Record\<string, any>,\
    &#x20;callback?: [GPUdbCallback](https://docs.kinetica.com/content/api/javascript/types/GPUdbCallback.md),\
    ): Promise\<[WmsImage](https://docs.kinetica.com/content/api/javascript/types/WmsImage.md)>

    Requests a map image from the WMS endpoint.Returns the raw image bytes rather than JSON, with the server's reported request time attached as `request_time_secs` -- the same shape the JavaScript API returns. Fails over across URLs like any other request.

    #### Parameters

    <ul>
      <li>
        request: Record\<string, any>

        WMS parameters, sent as the query string
      </li>

      <li>
        `Optional`callback: [GPUdbCallback](https://docs.kinetica.com/content/api/javascript/types/GPUdbCallback.md)

        Optional callback function
      </li>
    </ul>

    #### Returns Promise\<[WmsImage](https://docs.kinetica.com/content/api/javascript/types/WmsImage.md)>

    Promise resolving to the image bytes

    #### Example

    ```
    const image = await gpudb.wms_request({
        request: 'GetMap', width: 512, height: 512,
        bbox: '-180,-90,180,90', layers: 'my_table'
    });
    fs.writeFileSync('map.png', image);
    ```

    <ul>
      <li>Defined in [src/GPUdb.ts:1778](https://github.com/kineticadb/kinetica-api-typescript/blob/master/src/GPUdb.ts#L1778)</li>
    </ul>
  </li>
</ul>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.