Skip to content

geojson point change circle marker to icon #148

Description

@Chadjhou

hello gays
i use this in my code,

var tile = L.vectorGrid.slicer(geojson,{
                    interactive: true,
                    rendererFactory: L.canvas.tile,
                    vectorTileLayerStyles:{
                        sliced: { icon: new L.Icon.Default()}
                    }
                    }).addTo(map);
tile.on('click', function(e) {
                        var pro = e.layer.properties;
                        var HTML = '';
                        for (var q in pro) {
                            HTML += q + ":" + pro[q] + '<br />';
                        }
                        L.popup()
                            .setContent(HTML)
                            .setLatLng(e.latlng)
                            .openOn(map);
                    })

and now i can get icon on my map but if move mouse moveon icon
and i get some error like that
""Uncaught TypeError: Cannot read property 'lat' of undefined""

someone can help me??

i use leaflet 1.2.0 in chrome

example is here : https://plnkr.co/edit/FdHsFj4WbheXT90z1fTm?p=preview
thx

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions