

# Example: Draw a polygon
<a name="example-draw-polygon"></a>

![\[alt text not found\]](http://docs.aws.amazon.com/location/previous/developerguide/images/samples/polygons_small.png)


This code example shows how to draw a polygon on the map. Uses MapLibre, Node.js, React, the Amazon Location authentication helper, and JavaScript.

Geospatial GitHub link: [Interactive map with polygons](https://github.com/aws-geospatial/amazon-location-samples-react/tree/main/map-with-geojson)