rveciana / d3-composite-projections

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

custom ClipExtent #19

Open saifulazfar opened 5 years ago

saifulazfar commented 5 years ago

not really an issue here...just a question if its possible

im trying to achieve this (a template for my malaysia map project) to-achieve its mean that (if its possible) to have custom clipextent rather rectangular clip https://github.com/rveciana/d3-composite-projections/blob/c997f4f97a18670b4ea5fcc1b339ade5e321b127/src/mercatorMalaysia.js#L71-L79 current clip extent current i dont have problem to draw custom composite border line...but the problem persist on d3 graticule line...i just can get it right unles i draw the graticule manually

any help would be great...

inspired from this great national geographic map

ng new zealand newguinea 1962

rveciana commented 5 years ago

You can always use the SVG clip path: http://bl.ocks.org/rveciana/6193058 or the canvas context.clip(); as here: http://bl.ocks.org/rveciana/6192418 If I have some time, I can try to make the example