shang445751741 / earth-api-samples

Automatically exported from code.google.com/p/earth-api-samples
0 stars 0 forks source link

Altitude wrongly returned in feet by kmlMouseEvent().getAltitude() - should be meters #308

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Go to http://code.google.com/apis/ajax/playground/?
type=earth#globe/window_event_handling
2. Insert lookat code before "function eventhandler"

  // Fly to the UK location
  var la = ge.createLookAt('');
  la.set(51.00, -1.00, 0, ge.ALTITUDE_RELATIVE_TO_GROUND,
         0, 0, 800);
  ge.getView().setAbstractView(la);

3. "Run Code", click on centre of screen and note height returned in alert 
box.
4. Altitude returned is about 370 dependent on the precise click point.
5. Check the height using Google Earth desktop application and a value of 
about 390 feet is returned (Option to display feet selected). This value 
has also been verified by reference to UK National mapping and US SRTM 
data.

Expected behaviour:  API documentation states return value for getAltitude
() should be meters so the value should be around 120. This bug also 
occurs for getGlobe().getGroundAltitude

Which plugin version are you using? 5.0.11738.1858

Which browsers and operating systems are affected? Behaviour observed 
under IE7 and FF3.5 both running under Windows XP SP3

Andy

Original issue reported on code.google.com by andrew.w.watson@btinternet.com on 6 Aug 2009 at 9:01

GoogleCodeExporter commented 9 years ago
Issue solved: further investigation showed a registry issue between GE desktop 
and 
GE plugin. The "Render/ElevationExaggeration" key causes getAltitude() to scale 
its 
result. Re-installation solved the problem. Suggest closure of the issue.
Andy

Original comment by andrew.w.watson@btinternet.com on 6 Aug 2009 at 11:55

GoogleCodeExporter commented 9 years ago
Ah, ok. Did you tweak the registry manually, at an earlier time? The desktop 
client
and plugin shouldn't be using each others' settings.

Original comment by api.roman.public@gmail.com on 8 Aug 2009 at 2:16

GoogleCodeExporter commented 9 years ago
Roman
As you surmised the registry had been altered - a restored backup after a 
development application crash was put in the wrong GE branch - I've learnt my 
lesson 
to double check.
Thanks for you help.
Andy

Original comment by andrew.w.watson@btinternet.com on 8 Aug 2009 at 2:30

GoogleCodeExporter commented 9 years ago
Ah ok :-)

Original comment by api.roman.public@gmail.com on 9 Aug 2009 at 1:27