Using Google Earth API to find the structure of a landscape
I am looking to use the Google Earth API to hel开发者_如何学运维p one of my robots navigate around big obstacles (such as buildings).
Is there any way to get information on the structure of buildings/features (such as trees) that Google Earth renders through the Javascript API?
I think you can achive this via hit-testing - the GEHitTestModeEnum
GEPlugin.HIT_TEST_BUILDINGS
may be suitable for your needs - although the actual accuracy in the real world may not be high enough for you. Calculating a 'buffer zone' around you robot would be the best bet.
Here is the GEView hit-test documentation
https://developers.google.com/earth/documentation/reference/interface_g_e_view#a8e8274c1236b6bbeff60a7a74e15995c
Here is a working hit-test example.
http://earth-api-samples.googlecode.com/svn/trunk/examples/hittest.html
精彩评论