Questions tagged [d3.geo]

d3.geo is the core geographic system and map making tool on D3js.

D3.geo is the core geographic system and map making tool on D3js.

43 questions
1
vote
1 answer

d3.js zoom transition with map tiles

I'm trying to implement a zoom transition on a map that uses tiles. I want to zoom in on one location, then go back and forth between two other locations. This is the example I'm working from: http://bl.ocks.org/mbostock/6242308 That does what I…
1
vote
0 answers

Why times Math.PI * 2 , when set zoom scale?

In some d3 tile map example, when use projection to set zoom scale , it always times 2*Math.PI. for example, in this demo "D3 Tile Map with Hand-Drawn Polygon". http://bl.ocks.org/emeeks/11051379 var zoom =…
max
  • 146
  • 1
  • 8
0
votes
0 answers

Weird results with topojson.merge

I am trying to draw realistic (non-straight) borders of randomly generated countries using d3.geoVoronoi and topojson.merge. This is what I am doing: I create 3 Voronoi diagrams, say A, B and C, respectively with 100, 1000, and 10000 cells. I merge…
Fede
  • 91
  • 6
0
votes
1 answer

How can I translate position of d3.symbol on WSG84 coropleth map?

I am having a hard time drawing a symbol (star) at a given location [lan, lon] on a topojson map. How can I translate the coordinate pairs into the SVG pixel coordinate system? I am using a basic map example from the Eurostat NUTS dataset, with a…
SdBBdS
  • 1
0
votes
0 answers

Drawing Graticule behind a map in d3.geo

I am using d3 to design a bubble map chart. I am struggling to add the graticule behind the map. It is drawing the graticule object but it is empty. Can someone please help me? On the specific, the code I am using to draw the graticule is the…
Jumpy
  • 1
0
votes
0 answers

Path elements not drawn on map when plotting many polygons with D3.js and Leaflet

I need to plot many polygons from a FeatureCollection geojson file. When I do so using D3.js and Leaflet, my path elements are drawn far away off the map. And my svg element is drawn with a height of zero. Why is my code giving me this result? I…
0
votes
1 answer

How do I get my topojson file to work with datamaps?

I am trying to load my custom topojson file but I am getting this error: Cannot read property 'type' of undefined from this line 219 in topojson.min.js v1.6.9 return o.type === "GeometryCollection" ? { I am using d3 v3.5.3 and topojs v1.6.9…
Alonzo
  • 85
  • 1
  • 10
0
votes
0 answers

How to add labels to each location node d3.geo?

I need to add labels for each location node which is possible to style for mouse hover & click events. Exapmple Image is here Check this Code Pen sample for the code I wrote so far. // load and display the world and locations d3.json( …
WenukaGTX
  • 155
  • 1
  • 1
  • 9
0
votes
1 answer

standard coordinates in d3.js

I've been keen on developing a choropleth map for Namibia.But found two interesting tools. leaflet and D3, though leaflet has clear instructions to implement which i did Its not so functionally in line with what i want to do. And that is where D3Geo…
0
votes
0 answers

Affine transformation in d3.geo (Euler angles rotation)

I would like to perform a counter-clockwise rotation of a country polygon about an origin in d3.geo. For example, let's rotate Italy -7.2 degrees around a point with λ=0.5, φ=49.9. First, we need to transform those Euler angles into an Affine…
0
votes
0 answers

More Detailed Country Polygons on D3 (Puerto Rico)

I am following the tutorial of map making and I wanted to have my map zoom in on Puerto Rico (as opposed to the UK) in the tutorial. To adjust the project parameters though, I had to rely on tinkering with the values as what I would expect didn't…
Wes
  • 101
  • 1
  • 1
  • 4
0
votes
0 answers

d3.js and python's googlemaps (more NaN from d3.geo.path())

I am trying to modify this example with data from cvs file with node and link data. I have addresses that were obtained from python's googlemaps module. All the nodes have, two floats 39.338923 / -74.475714 that represent the longitudinal/…
Charlie
  • 189
  • 14
0
votes
0 answers

D3js transition mess?

I get stranges artifacts during my reprojection's transition (from top to bottom) : (1) Starting state snapshot : (2) Transitioning (zooming-in) snapshot: (3) Final state snapshot: The live demo is there. No error messages in the console. Both…
Hugolpz
  • 17,296
  • 26
  • 100
  • 187
1 2
3