---
layout: api
title: "v2.2.0 JavaScript Library: L.Rectangle"
categories: api
version: v2.2.0
permalink: /api/v2.2.0/l-rectangle/
---
<h2 id="rectangle">Rectangle</h2>

<p>A class for drawing rectangle overlays on a map. Extends <a href="/mapbox.js/api/v2.2.0/l-polygon">Polygon</a>. Use <a href="/mapbox.js/api/v2.2.0/l-map">Map#addLayer</a> to add it to the map.</p>

<h3>Usage example</h3>
<pre><code class="javascript">// define rectangle geographical bounds
var bounds = [[54.559322, -5.767822], [56