---
title: "automatic | 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.

# Function automatic

-   automatic(options?: [BoundedStaticMapOptions](https://docs.maptiler.com/sdk-js/api-reference/types/BoundedStaticMapOptions/)): string[](#automatic)
    
    Construct the URL for a static map automatically fitted around the provided path or markers. Note: this function does not fetch the binary content of the image since the purpose of a static map is generally to have its URL as a `src` property of a  element. If a path is provided and is too long, it will be simplified in an accurate way.
    
    #### Parameters
    
    -   `Optional`options: [BoundedStaticMapOptions](https://docs.maptiler.com/sdk-js/api-reference/types/BoundedStaticMapOptions/)
    
    #### Returns string
