Dingshao / winforms-geplugin-control-library

Automatically exported from code.google.com/p/winforms-geplugin-control-library
GNU General Public License v3.0
0 stars 0 forks source link

FlyToObject does not work if the coordinates for lat/lon are 0, 0. #94

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.  Use the following lines of code to create a placemark and add it to a 
kmltreeview.

FC.GEPluginCtrls.Geo.Coordinate Coord = new FC.GEPluginCtrls.Geo.Coordinate();  

kmlTreeView.ParseKmlObject(
      KmlHelpers.CreatePlacemark(ge,Coord,ID,Name,Description);

What is the expected output? What do you see instead?

Upon double-clicking the treeviewnode the globe view should zoom in to the 
placemark and the balloon should open.
Instead, the view does NOT zoom but the balloon DOES open.

What version of the product are you using? On what operating system?
API version 1.010, Windows 7, Visual Studio 2012

Please provide any additional information below.
If the lat/lon is changed to any value other than 0,0 the "FlyTo" seems to 
work.  Even if only one of them is changed everything works fine, i.e. 0.1, 0.

Original issue reported on code.google.com by tracyJan...@gmail.com on 12 Oct 2012 at 10:02

GoogleCodeExporter commented 8 years ago
Yes, the coordinates 0,0 are considered undefined by the library and as such 
the flyto behaviour will not work. I considered using Double.NaN to rectify 
this issue but that in-itself introduces some other issues. I will take another 
look at this and will see if it can be resolved. 

Out of interest, is the point at 0,0 vital for your work or is it just that you 
used those coordinates to test something?

Best,

Fraser

Original comment by fraser.c...@gmail.com on 18 Nov 2012 at 7:12

GoogleCodeExporter commented 8 years ago
Hi Fraser,

Not vital at all.  I was just using 0, 0 as a test point but I spent a couple 
of days trying to figure out how to make a LookAt or FlyTo work.

Tracy

Original comment by tracyJan...@gmail.com on 27 Nov 2012 at 1:24

GoogleCodeExporter commented 8 years ago
OK, I will document the behavior more clearly rather than changing it. 

Just to clarify why, an empty coordinate has to have a value and it seems 
logical to make this 0,0 by default. 

As certain operations return an empty coordinate when they fail it seems 
logical too to ignore any 0,0 coordinates as 'empty'.

Original comment by fraser.c...@gmail.com on 20 Jan 2013 at 2:45