---
layout: example
categories: example/v1.0.0
version: v1.0.0
title: Draggable marker
description: Create a marker a user can drag to a new location.
tags:
  - ui
  - markers
---
<div id='map'></div>

<script>
var map = L.mapbox.map('map')
    .setView([37.9, -77],4)
    .addLayer(L.mapbox.styleLayer('mapbox://styles/mapbox/streets-v11'));;

var marker = L.marker(new L.LatLng(37.9, -77), {
    icon: L.mapbox.marker.icon({
        'marker-color': 'ff8888'
    }),
    draggable: true
});

marker.bindPopup('T