Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
@Root
Call me out if I'm wrong, but isn't JS single threaded, so no race-conditions possible? -
Root797346y@metamourge You're right, js is single-threaded. But it also supports async functions, which run in arbitrary order, and with shared / incorrectly-scoped variables (etc.) this can absolutely lead to race conditions.
-
@Root
Ah,OK.
I was thinking of race-conditions, as in,
Two threads run simultaneously, one modifies a variable, the other reads it at the same time. -
Root797346y@metamourge Yep yep. Two implementations of the same issue.
And they're much harder to debug in a multithreading environment! -
I have used it, though about 2 years ago...
Something was about marker groups.
Maybe you overwrite an object reference or similar. -
Wombat102476y@PonySlaystation @Root @metamourge
I solved it. The problem was trivial. I was dumb. It only rendered three random markers, because I only fetched fucking three random locations.
😐
Damn, that shit ate a lot of time... -
Wombat102476y@PonySlaystation I really like leaflet.js for working with openstreetmaps. Do you know how to change the map tiles to another style? Or change the language used on the tiles?
-
@Wombat Oh... I have not done that specific case yet... I've only used leaflet in one project with a group of SVGs as the map (no tiles).
You can see it on http://www.afbn.ch/map/ 😉
I had to use HTML Markers, but the code is relatively ugly and it runs on WordPress 🤮🤣
AfBN is a regional (government-funded) organization to keep the regional highways in shape, do highway snow plowing, tunnel maintenance and highway accident response. -
@Wombat Thanks 😄
Yeah, the design agecy really did a great job. It was not a cheap website. 😄 -
Have you ever worked with leaflet.js to display openstreetmap? I do and its great.
But now I want to display multiple markers on a map and the map somehow only renders random three markers. Wtf?
I'm lost. All results on google show me how to do it right, but it just doesn't work.
question
leaflet
javascript
openstreetmap