rsignavong / elm-leaflet-map / LeafletMap

This library will load the Custom Html Element into the DOM.

HTML Element

view : List (Html.Attribute msg) -> List ( String, Html msg ) -> Html msg

Renders a Leaflet map

Leaflet.view
    [ LeafletMap.mapId "mapid"
    , LeafletMap.className "map"
    , LeafletMap.defaultPopup "Panda was THERE!"
    , LeafletMap.iconHeight 64
    , LeafletMap.iconWidth 64
    , LeafletMap.iconUrl "https://image.flaticon.com/icons/svg/194/194648.svg"
    , LeafletMap.latitude 51.505
    , LeafletMap.longitude -0.09
    , LeafletMap.scale 13
    , LeafletMap.showDefaultMarker True
    , LeafletMap.showScale True
    , LeafletMap.tileLayer "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
    ]
    [ ( "marker"
      , Leaflet.marker
            [ LeafletMap.iconUrl "https://image.flaticon.com/icons/svg/194/194648.svg"
            , LeafletMap.iconHeight 64
            , LeafletMap.iconWidth 64
            , LeafletMap.latitude 51.505
            , LeafletMap.longitude -0.12
            ]
            [ text "... and THERE!"
            ]
      )
    ]

Attributes

latitude : Basics.Float -> Html.Attribute msg

latitude

longitude : Basics.Float -> Html.Attribute msg

longitude

mapId : String -> Html.Attribute msg

mapId

scale : Basics.Int -> Html.Attribute msg

scale

tileLayer : String -> Html.Attribute msg

tileLayer

className : String -> Html.Attribute msg

className

defaultPopup : String -> Html.Attribute msg

defaultPopup

iconHeight : Basics.Int -> Html.Attribute msg

iconHeight

iconUrl : String -> Html.Attribute msg

iconUrl

iconWidth : Basics.Int -> Html.Attribute msg

iconWidth

showDefaultMarker : Basics.Bool -> Html.Attribute msg

showDefaultMarker

showScale : Basics.Bool -> Html.Attribute msg

showScale

bubblingMouseEvents : Basics.Bool -> Html.Attribute msg

bubblingMouseEvents

color : String -> Html.Attribute msg

color

dashArray : String -> Html.Attribute msg

dashArray

dashOffset : String -> Html.Attribute msg

dashOffset

fill : Basics.Bool -> Html.Attribute msg

fill

fillColor : String -> Html.Attribute msg

fillColor

fillOpacity : Basics.Float -> Html.Attribute msg

fillOpacity

fillRule : String -> Html.Attribute msg

fillRule

lineCap : String -> Html.Attribute msg

lineCap

lineJoin : String -> Html.Attribute msg

lineJoin

opacity : Basics.Float -> Html.Attribute msg

opacity

radius : Basics.Float -> Html.Attribute msg

radius

stroke : Basics.Bool -> Html.Attribute msg

stroke

weight : Basics.Float -> Html.Attribute msg

weight

userLatitude : Basics.Float -> Html.Attribute msg

userLatitude

userLongitude : Basics.Float -> Html.Attribute msg

userLongitude

userIconUrl : String -> Html.Attribute msg

userIconUrl

userIconWidth : Basics.Int -> Html.Attribute msg

userIconWidth

userIconHeight : Basics.Int -> Html.Attribute msg

userIconHeight

HTML Element

marker : List (Html.Attribute msg) -> List (Html msg) -> Html msg

Add leaflet-marker child node

circle : List (Html.Attribute msg) -> List (Html msg) -> Html msg

Add leaflet-circle child node}