This example displays a moveable map of Boston, including a marker. The marker can also be moved around the map.

Code

Default markers are created by using the H.map.Marker class without specifying an icon and passing in a location only. To respond to drag events the marker.draggable flag needs to be set. The default panning interaction of the map (H.mapevents.Behavior) must be disabled whilst the drag event is in operation.