Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set DirectionsRendererOptions.MarkerOptions.Icon to a new Symbol() #400

Open
NickBarrett opened this issue Feb 14, 2025 · 1 comment

Comments

@NickBarrett
Copy link
Contributor

I'm trying to set the origin and destination markers for a DirectionsRequest to white circles. To do this I am trying to set the DirectionsRendererOptions.MarkerOptions.Icon to a new Symbol() object.

The code looks like the following:

private DirectionsRendererOptions CreateDirectionRendererOptions()
{
    return new DirectionsRendererOptions()
    {
        Map = _map.InteropObject,
        MarkerOptions = new MarkerOptions()
        {
            Icon = new Symbol()
            {
                Path = SymbolPath.CIRCLE,
                Scale = 4,
                StrokeWeight = 2,
                FillColor = "white",
                FillOpacity = 1
            }
        }
    };
}

The error I'm getting is the following:

Uncaught Error: First instruction in path must be "moveto".
    at UZa.Fg (util.js:236:498)
    at jYa (marker.js:20:64)
    at kYa (marker.js:19:168)
    at UZa.Hg (marker.js:76:674)
    at common.js:90:222

If I remove the Icon = new Symbol() code, the error goes away (but I get the default markers for the origin and destination).

This issue appears similar to #392.

@valentasm1
Copy link
Collaborator

I will take a look this week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants