rveciana / d3-composite-projections

Set of d3 projections for showing countries distant lands together
http://rveciana.github.io/d3-composite-projections/
Other
98 stars 22 forks source link

custom composite projection #25

Open espinielli opened 2 years ago

espinielli commented 2 years ago

I would like a map of Europe similar to the currently available one, i.e. Europe and Canaries. My initial understanding is that I could add a new composite projection with the pieces I need. I would then like to use it in Observable, so I guess I could make it available from my forked repo?

Thanks in advance for any helps provided

rveciana commented 2 years ago

Hello, you can use it directly, but not move the different regions. If you want all europe, you can use the one named conicConformalEurope, like here http://bl.ocks.org/rveciana/4bcc5750c776c22ffda6 (the layer is broken, but the code should work!)

espinielli commented 2 years ago

In fact I am playing with a dedicated one, see this notebook. I removed the bits I am not interested in ;-) and changed few scales...

The difficulty I have right now are:

  1. understand the logic/what needs to be changed to move the insets in other parts of the plot
  2. plot the boxes around the insets in the observable notebook using Plot.carto (I think the drawCompositionBorders should work...in the end I just removed bits and pieces from the conicConformalEurope ;-)

Any suggestions on the above are super welcome

rveciana commented 2 years ago

I'll check it. I've never worked with plot.carto...

espinielli commented 2 years ago

I just managed to get 2. working. The only problem I have is to move the insets to different positions, i.e. 1.

saifulazfar commented 1 year ago

@espinielli i just stumbled upon ur issue...u can definitely help PR with ur specific composite projection by create new file at src...simply just use conicConformalEurope.js as the reference...or maybe https://observablehq.com/@d3/u-s-map-with-puerto-rico can help as ref too...but if u still not sure then i can help u...but u need to provide picture/image reference where u want the inset map are