Module

Leaflet.Map

Package
purescript-leaflet-tdammers
Repository
tdammers/purescript-leaflet-tdammers

#Layer Source

data Layer :: Type

A map layer

#MouseEvent Source

type MouseEvent = { containerPoint :: Point, latlng :: LatLng, layerPoint :: Point }

Metadata for a mouse event.

#map Source

map :: forall e. String -> LatLng -> Zoom -> Eff (leaflet :: LEAFLET | e) Map

map domID latLng zoom creates a new map object centered at latLng, at zoom level zoom, and attaches it to the DOM element with ID domID.

#addLayer Source

addLayer :: forall e. Layer -> Map -> Eff (leaflet :: LEAFLET | e) Unit

Add a layer to a map

#setView Source

setView :: forall e. Map -> LatLng -> Zoom -> Eff (leaflet :: LEAFLET | e) Unit

Set the current view for a map.

#invalidateSize Source

invalidateSize :: forall e. Map -> Eff (leaflet :: LEAFLET | e) Unit

Tell a map that the size of its container may have changed, causing it to

#getCenter Source

getCenter :: forall e. Map -> Eff (leaflet :: LEAFLET | e) LatLng

Get the geographic position at which the map is currently centered.

#getZoom Source

getZoom :: forall e. Map -> Eff (leaflet :: LEAFLET | e) Zoom

Get the current zoom level.

#onZoom Source

onZoom :: forall e. Map -> e Unit -> e Unit

Subscribe to the zoom event, which fires when the map's zoom level changes.

#onMove Source

onMove :: forall e. Map -> (LatLng -> e Unit) -> e Unit

Subscribe to the move event.

#onMouseEvent Source

onMouseEvent :: forall e. String -> Map -> (MouseEvent -> e Unit) -> e Unit

Subscribe to a mouse even by name.

#onMouseMove Source

onMouseMove :: forall e. Map -> (MouseEvent -> e Unit) -> e Unit

Subscribe to the mousemove event

#onMouseOver Source

onMouseOver :: forall e. Map -> (MouseEvent -> e Unit) -> e Unit

Subscribe to the mouseover event

#onMouseOut Source

onMouseOut :: forall e. Map -> (MouseEvent -> e Unit) -> e Unit

Subscribe to the mouseout event

#onMouseUp Source

onMouseUp :: forall e. Map -> (MouseEvent -> e Unit) -> e Unit

Subscribe to the mouseup event (mouse button pressed)

#onMouseDown Source

onMouseDown :: forall e. Map -> (MouseEvent -> e Unit) -> e Unit

Subscribe to the mousedown event (mouse button released)

#onClick Source

onClick :: forall e. Map -> (MouseEvent -> e Unit) -> e Unit

Subscribe to the click event

#onDblClick Source

onDblClick :: forall e. Map -> (MouseEvent -> e Unit) -> e Unit

Subscribe to the dblclick event (double click)