Questions tagged [d3-geo]
The d3-geo tag has no usage guidance.
d3-geo
12
questions
1
vote
1
answer
51
views
Why doesn't d3 like this GeoJSON file?
Does anyone have any idea why D3 is failing to render the following GeoJSON?
<!DOCTYPE html>
<meta charset="utf-8">
<body>
<svg width="960" height="720"></svg>
&...
1
vote
1
answer
91
views
D3 globe with country names label layer
I'm struggling to find any example of a D3 globe (or Globe-gl etc.) that has country names as a label layer. I'm essentially looking for this demo
https://observablehq.com/@michael-keith/draggable-...
5
votes
1
answer
97
views
How do I update a d3 projection to match zoom transform?
This is my zoom handler for my map:
const zoom = d3.zoom()
.scaleExtent([1,25])
.translateExtent([[width * -0.5, height * -0.5], [width * 1.5,height*1.5]])
.on('zoom', (ev) => {
...
0
votes
0
answers
23
views
How can I animate scale and rotation of d3-geo projection at the same time with different durations and ease functions?
The title is pretty descriptive of my question. I'm trying to find the most idiomatic/easy way to animate the scale and rotation property of a d3-geo projection (https://d3js.org/d3-geo/projection).
I'...
1
vote
0
answers
26
views
What could explain this apparent slowdown on Firefox when using d3-geo projections with React.js?
I'm completely stumped by this, so please let me know if I should tag this differently or post elsewhere - also please let me know if you need more information.
I'm working on a project using React ...
0
votes
0
answers
19
views
d3-geo: Is there a way to not show the division between territories spanning 180/-180 degrees of longitude?
The question from the title. I'm running a code with D3-geo, Miller projection with .rotate([-10, 0]);, so The US would be on the left side of the map, and Russia entirely on the right side. However, ...
0
votes
0
answers
41
views
D3: How to 'rotate' background texture along with the projection
I am building a spinning globe with D3 with a image texture. I have built the globe and spinning it using
this.projection = d3.geoOrthographic()
.fitExtent([[this.inset, ...
2
votes
0
answers
63
views
d3-geo coordinate in feature always returning true
I have a geojson file defined, and I am checking to see whether a coordinate is in the given feature inside that geojson file. No matter what coordinate I plug in to the d3.geocontains() function, ...
1
vote
0
answers
110
views
Path elements outside svg [d3-geo, topojson]
I made a choropleth map for freecodecamp project.
https://codepen.io/prewol/pen/rNvxGZy
the g elements start outside the svg parent
.graphCont {
margin: auto;
background-color: beige;
box-...
0
votes
0
answers
202
views
D3 path not showing
I am trying to make some features from a .geojson file render using D3 and D3geo and i am following this https://www.d3indepth.com/geographic/ as a guide. I don't really know what i am doing since i ...
0
votes
1
answer
472
views
Simplifying a GeoJson FeatureCollection using mapshaper causes issues
More specifically, it causes the same code to render an outline on the map, and only recognizes the last path element when using pointer events.
I simplified a continents.json file on mapshaper using ...
5
votes
2
answers
961
views
Can't import d3-geo package into Node.js TypeScript project
I'm trying to create code to test whether specific latitude/longitude coordinates can be found within various GeoJSON Features.
If I do this:
import d3 from 'd3-geo'; // or: import * as d3 from 'd3-...