Nevron Forum

Maps

https://www.nevron.com/Forum/Topic4635.aspx

By Luis Mendes - Monday, December 13, 2010

Can you create a connection (line) between two locations on a map?
By Nevron Support - Tuesday, December 14, 2010

Yes, you can. The shapes that the map importer creates are standard diagram shapes, so you can do whatever you want with them.
By Luis Mendes - Wednesday, December 29, 2010

Thanks, can you help me with an example? I am looking at the OnPointCreated event and trying to add a line between two capitals but am not being successfull
By Luis Mendes - Wednesday, December 29, 2010

OnPointCreated ( NDiagramElement element, NGisFeature feature 
Gives me the NPointElement for the capital (feature.Attributes["CAPITAL"]), which assigns the shape of the NPointElement to a custom point shape
pe.Shape = PointShape.Custom;
I am trying to create a NLineShape and assing the fromShape to toShape to two captials (NPointElement), however this is not working.
 
Any help?
By Luis Mendes - Wednesday, December 29, 2010

OK, I got to display a line with the following -
new NLineShape(_startPoint, _endPoint);
_startPoint from the bounds of Capital city A, _endPoint from the bounds of Capital city B.
The problem is I can only see the line whithin a certain zoom, if I zoom into the capitals I loose the line 
 
Edit: I got it! The line was added to the countries layer, when I added a new layer with the EnableShowInZoomRange and set the appropriate MinShowZoomFactor it worked fine!