PaackEng/elm-google-maps/2.2.0

NOTE: the latest version is 2.5.0

GoogleMaps.Plugins.DrawingTool

This module allows you to draw polygons on the map

This documentation it's WIP

Types

type alias Events msg =
Events msg

Opaque type that lists the message(s) that will be triggered with actions while drawing.

type alias State =
State

Opaque type that upholds the data required to know if drawing mode is enabled or disabled.

Events

events : (List ( Float, Float ) -> msg) -> Events msg

Initializer for Events. Requires a message that will trigger once the user closes a polygon.

Initialize State

initState : State

Initializer for State.

Updating state

startDrawing : State -> State

Enters the drawing mode. (Allows the user to draw polygons on the map)

stopDrawing : State -> State

Leaves the drawing mode. (Does not allows the user to draw on the map)

Utilities

isDrawingEnabled : State -> Bool

Queries if the drawing mode is currently active.