Ask HN: Are there any JavaScript libraries for generating maps?
Does anyone have any thoughts along these lines?
Does anyone have any thoughts along these lines?
http://bost.ocks.org/mike/map/
And here’s a subsequent tutorial for visualizing geographic data:
Thanks for your hard work Mike!!!
To create the whole map on the fly using JavaScript - try mapbox-gl.js [3]. You should be able to pass your location boundaries via mapboxgl.GeoJSONSource (and then you probably don't even need MapBox API key - haven't tried it, though) and style it like this: https://www.mapbox.com/mapbox-gl-styles/styles/bright-v4.jso...
PS. If you decide to host your own tiles - remember that browsers limit the number of connections to each domain. Your map will load much faster if you serve tiles from several different domains, e.g. tiles1.example.com, tiles2.example.com, etc.
[1] TileMill - https://www.mapbox.com/tilemill/
[2] Leaflet - http://leafletjs.com/
[3] MapboxGL - https://www.mapbox.com/mapbox-gl/
Mapbox is a great alternative for stylish maps. Their JS library is built off of Leaflet which allows you to change the tileset at a later date.
If you want to go a bit further, stamen mapstack does some cool stuff: http://mapstack.stamen.com/
For those wanting an example:
http://kut.org/term/google-fiber
Basically just a grey/white map showing important navigational details like roads and rivers, with different color sections overlaying it.
How did you do it?
Did we help?
If you just want to produce choropleths, you can try Leaflet. Other options include d3.js and kartograph.
I'm a fan of datamaps, https://datamaps.github.io/, for doing some quick and getting decent output.
Regards.