• JMap.Event.Map.on.mouseMove

    This event is triggered when the mouse is moving over the map (when user or library pan the map).

    Parameters

    • listenerId: string

      Your listener id (must be unique for all map events)

    • fn: ((params) => void)

      Your listener function

    Returns void

    Example

    // When mouse is moving over the map, will display a message in the console
    JMap.Event.Map.on.mouseMove(
    "custom-map-mouse-move",
    args => {
    console.log(
    `The mouse is moving on layer id="${args.layerId}"`, map.location,
    args.map, args.mapEvent // mapEvent is the Maplibre event
    )
    }
    )