• JMap.MouseOver.renderForFeaturesSelection

    From the feature selection you provide, it process the mouseover for it, and render it inside the div of your choice.

    Parameters

    • containerId: string

      The div id where to display the mouseover content

    • selection: JMapSelection

      A feature selection, the mouseover will be processed only for this features

    Returns boolean

    true if we displayed content in the div, false if no mouseover found for any layer

    Throws

    Error if div doesn't exist in the DOM, or selection format is not good

    Example

    // Display in the div id="my-custom-div" the content of mouseover for the provided selection
    JMap.MouseOver.renderForFeaturesSelection("my-custom-div", {
    4: [ // selection for layer 4
    { id: 345, type: "Point", geometry: {...}, properties: [...] },
    { id: 234, type: "Point", geometry: {...}, properties: [...] }
    ],
    8: [ // selection for layer 8
    { id: 187, type: "Line", geometry: {...}, properties: [...] },
    { id: 98, type: "Line", geometry: {...}, properties: [...] }
    ]
    })