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

# Variable Path2D

Path2D: { prototype: [Path2D](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Path2D/); new (path?: string | [Path2D](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Path2D/)): [Path2D](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Path2D/) }

#### Type Declaration

-   -   new (path?: string | [Path2D](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Path2D/)): [Path2D](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Path2D/)
    -   #### Parameters
        
        -   `Optional`path: string | [Path2D](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Path2D/)
        
        #### Returns [Path2D](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Path2D/)
        
-   ##### prototype: [Path2D](https://docs.maptiler.com/sdk-js/api-reference/interfaces/Externals.Path2D/)
