News for hackers. Stuff that matters.
Re:Small Assets without the Headache in Elm 0.19 by protomikron on Tuesday August 21, 2018 @01:08PM (#17811502)
Since there are some Elm users in this thread, I'll ask here: What's currently the best way to integrate an interactive map (i.e. zoom, pan, draw polygons, etc.) into an Elm application (something like leafletjs)?

If I search for it, I find https://package.elm-lang.org/packages/kennib/elm-maps/latest but the examples are not working for me, it feels like some mouse events get missed?

E.g. here: https://kennib.github.io/elm-maps/examples/Fullscreen

[edit]

Ok, it's not working for me on Firefox, but does seem to work better on Chromium (although some tiles are not rendered, but that might also be a server-side issue). Map support is crucial for me and was the reason I didn't dive into Elm so far, but maybe the problem is resolved now?

Re:Small Assets without the Headache in Elm 0.19 by rtfeldman on Tuesday August 21, 2018 @01:11PM (#17811545)
Custom Elements!

Check out this talk about how to do it: https://www.youtube.com/watch?v=tyFe9Pw6TVE

For future reference, the quickest way to get questions like this answered is in the #beginners channel on Elm Slack:

http://elmlang.herokuapp.com

Tons of super helpful people there!

Re:Small Assets without the Headache in Elm 0.19 by protomikron on Tuesday August 21, 2018 @01:19PM (#17811639)
Thank you for the quick response. Just out of interest are the examples working for you? E.g. Leaflet's Hello World is just ridiculously simple and short (if you check out the source): https://leafletjs.com/examples/quick-start/example.html

I am searching for something similar in Elm. I'll head over to other channels for more questions, thanks.

Re:Small Assets without the Headache in Elm 0.19 by lukewestby on Tuesday August 21, 2018 @04:01PM (#17813180)
Here's a full example using a custom element

https://ellie-app.com/37h3TdyF3w5a1

Re:Small Assets without the Headache in Elm 0.19 by rtfeldman on Tuesday August 21, 2018 @01:30PM (#17811771)
I honestly have never used LeafletJS, so I'd be the wrong person to ask - I'm just familiar with the technique to embed things like that in Elm applications. :)
Re:Small Assets without the Headache in Elm 0.19 by protomikron on Tuesday August 21, 2018 @01:36PM (#17811842)
No problem. :) I just wondered if you also have problems with my (Elm) example link, i.e. the scroll (zoom) events seem to get missed. However I followed your advice and headed over to the Slack channel.