Using d3.js, how can I (re)transform a projection to a given latitude and longitude value?
I am using d3 to render a mercator projection of a world map.
I would like to be able to use d3 to scale, and transform the map to known latitude and longitude values as the user steps through my application.
I found that projection.center (https://github.com/mbostock/d3/wiki/Geo-Projections#wiki-center) let me center the map to latitude and longitude value, but I couldn't work out how to re-center the map to a new value — let alone transition there smoothly.
I've found a few helpful examples, like Mike Bostock's (http://bl.ocks.org/mbostock/4699541), and useful questions, like the following about centering a map to a given GeoJSON object (Center a map in d3 given a geoJSON object), but they're solving more complex problems than I need to.
Please could a d3-wiz enlighten me to how I can simply center a projection to a given latitude and longitude value using SVG's transform, so I can weave some d3 transitions in there?
Many thanks in advance.Cannot update 13.04 from software updater
I tried updating my 13.04 from software updater.I had about 202.9 MB to download.I click Install an then a message came saying "It has to install form untrusted sources". I click OK and then the software updater Exits..There is no way i can update due to this problem..Please help..
I am using d3 to render a mercator projection of a world map.
I would like to be able to use d3 to scale, and transform the map to known latitude and longitude values as the user steps through my application.
I found that projection.center (https://github.com/mbostock/d3/wiki/Geo-Projections#wiki-center) let me center the map to latitude and longitude value, but I couldn't work out how to re-center the map to a new value — let alone transition there smoothly.
I've found a few helpful examples, like Mike Bostock's (http://bl.ocks.org/mbostock/4699541), and useful questions, like the following about centering a map to a given GeoJSON object (Center a map in d3 given a geoJSON object), but they're solving more complex problems than I need to.
Please could a d3-wiz enlighten me to how I can simply center a projection to a given latitude and longitude value using SVG's transform, so I can weave some d3 transitions in there?
Many thanks in advance.Cannot update 13.04 from software updater
I tried updating my 13.04 from software updater.I had about 202.9 MB to download.I click Install an then a message came saying "It has to install form untrusted sources". I click OK and then the software updater Exits..There is no way i can update due to this problem..Please help..
No comments:
Post a Comment