Hi. I'm pretty new to Elm (as in two weeks) so forgive my cluelessness
I'm trying to convert some JS code I have to render a map. The input is a
topojson file of grids forming the state of California.
What I do in JS is to use the topojson library to decode the file into
GeoJSON, and then render it using D3. Pretty much exactly like the code in
the d3 demo here: http://bl.ocks.org/mbostock/9656675
While I could just keep doing this in JS/D3, I find trying to translate
this to a new language is a great way to clue me in. I did this two weeks
ago in clojurescript/reagent, so now I want to try this in Elm.
I've hit a full stop at the type definition stage.
Following the approach of the D3 example from the link above, my intention
is to use an external call to the topojson.js library using a port to
convert the topojson using both the features() and mesh() functions, and
then return those to Elm to do the rendering. But it suddenly dawned on me
in the blob of GeoJSON objects, whereas in Elm I think I *have* to care.
So I'm not sure how to proceed. Should I translate all of GeoJSON spec
(http://geojson.org/geojson-spec.html) into type aliases, so that I have a
general purpose tool going forward? Or is there a lazier solution, where I
can just specify what I *care* about and ignore everything else?
Are there any existing strategies for dealing with GeoJSON?
You received this message because you are subscribed to the Google Groups "Elm
To unsubscribe from this group and stop receiving emails from it, send an email
For more options, visit https://groups.google.com/d/optout.