--- layout: api title: "v2.1.2 JavaScript Library: L.mapbox.marker.icon(properties)" categories: api version: v2.1.2 permalink: /api/v2.1.2/l-mapbox-marker-icon ---

## L.mapbox.marker.icon(properties)

A core icon generator used in `L.mapbox.marker.style`

Options | Value | Description
--- | --- | ---
feature | object | A GeoJSON feature object

Returns:

A `L.Icon` object with custom settings for `iconUrl`, `iconSize`, `iconAnchor`, and `popupAnchor`.

A working example of L.mapbox.marker.icon in use