11-16-2016 02:34 AM
Hi all,
I've defined FRMapLayout a new layout, which has the SVG of the map of France and it works (i.e., correctly displayed). However, when I set the coordinates of my nodes (each node correspond to a city for example Paris) they are not positioned correctly. After digging a little bit I found that the positioning is done by the USProjection function wich convert the latitude & longitude coordinates to X & Y coordinates on the SVG. Unfortunately, I couldn't understand in order to rewrite an FRProjection function.
Can someone explain the principals
Thx in advanced.
11-24-2016 02:50 AM
Hi Guedrez,
Is that possible to share the code that you did, so that we could help you?
Thanks
02-27-2017 11:13 PM
Hi Aleksei,
I have a similar problem. I am trying to create new topology layout but unable to understand how the USProjection works or correctly set node's position.
Here's my code :
http://codepen.io/deniza/pen/bqVVvJ
I just rename the USMap Topology related variables and fuınctions.
03-01-2017 10:48 PM
Hi,
I managed to change projection. It seems USProjection use Albert's USA Projection. I used d3 geo projection library for using Turkey Layout. I used mercator projection method which seems fine.
var NXprojection = d3.geoMercator().scale(2800).center([35.25,38.8]);
I just embedded this into next.js, is there any method to register new layout without changing the original code?
03-14-2017 12:38 AM
from the discussion D3 Geomap Integration?
created separate file and registered it,
topo.registerLayout('TURKEYMap', new nx.graphic.Topology.TURKEYMapLayout())
http://codepen.io/deniza/pen/bqVVvJ?editors=0010
Projection method should be changed or adjusted.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide