Skip to content

Rotate Markers #179

@nolatron

Description

@nolatron

Anyone able to get the Rotated Marker plugin to work with the Realtime Plugin? Its working my static map but trying to see if the realtime map will do use it as well for a flight sim tracker.

Here's my current code:

function createRealtimeLayer(url, container) {
    return L.realtime(url, {
        interval: 30 * 1000,
        getFeatureId: function(f) {
            return f.properties.pilot_num;
        },
        cache: true,
        container: container,
        onEachFeature (f,l) {
            l.setZIndexOffset(200);
            l.setIcon(IconPlayer);            
        }
    });
}

I tried l.setIcon(IconPlayer, rotationAngle:45);

and l.setIcon({IconPlayer, rotationAngle:45});

even tried adding l.rotationAngle(45);

but none worked.

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