Skip to content

Adding an icon to a marker. #14

Description

@mrunks

I was trying to add logic for including an Icon with a marker.

Should I not be able to do the following

Where Options represent Icon Options with the same names as ones provided by leaflet.

public class LeafletIcon .....

protected override async Task CreateJsObjectRef()
{
return await JSBinder.JSRuntime.InvokeAsync("L.icon", Options);
}

Then in the Marker options adding a property of LeafletIcon.

When I try the above I receive the following:

"Microsoft.JSInterop.JSException: t.icon.createIcon is not a function"

Or is there another way to go about adding an Icon to a marker ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions