Skip to content

Support custom result marker popups via callback #72

@nickdaugherty

Description

@nickdaugherty

It should be easy to customize the marker popup content by passing a function to the Geocoder options that takes a Pelias result as an argument and returns an html string or DOM element to be used as the marker popup.

L.control.geocoder( <api_key>, {
    ...
    markersPopup: function( result ) {
        // Create popup content here
        return result.properties.label;
    }
    ...
});

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions