---
title: "createBezierPathFromCoordinates | 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 createBezierPathFromCoordinates

-   createBezierPathFromCoordinates(  
        inputPath: \[number, number\]\[\],  
        outputResolution?: number,  
        simplificationThreshold?: number,  
    ): \[number, number\]\[\][](#createbezierpathfromcoordinates)
    
    Creates a smoothed path using cubic Bezier curves from an array of coordinates.
    
    This function takes a series of points and creates a smooth path by generating cubic Bezier curves between them. It uses the Catmull-Rom method to automatically calculate control points for each curve segment. If the path has fewer than 4 points, the original path is returned unchanged.
    
    #### Parameters
    
    -   inputPath: \[number, number\]\[\]
        
        Array of \[x, y\] coordinates that define the original path
        
    -   outputResolution: number = 20
        
        Controls how many points are generated along each segment (higher values create smoother curves with more points)
        
    -   `Optional`simplificationThreshold: number
        
        Optional threshold for simplifying the input path before creating the curves.
        
    
    #### Returns \[number, number\]\[\]
    
    An array of \[x, y\] coordinates representing the smoothed path
