Leaflet / Leaflet/Leaflet.VectorGrid
geojson point change circle marker to icon
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 676
- Forks
- 202
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Plunker reproduction and the L.vectorGrid.slicer configuration shown in the issue, focusing on the icon hover path that produces the undefined-lat error. Confirm the failure with Leaflet 1.2.0 and determine what needs to change so moving over the point icon no longer throws the error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100