Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

In Google Earth, if you move the mouse over a 3D model (building), it turns light blue. If you click on it, you get a description (or sometimes just an approximate address).

Google Earth plug-in web apps like Monster Milktruck or First Person Cam are wonderful educational tools for exploring an area, and learning about it spatially. For example you are walking or driving around Rome, and you see buildings like the Coliseum or the Forum, but you don't know what they are; so it would be very useful to be able to click on them as you can in Google Earth, and get a description.

Is there any way to do this in the G Earth Plug-in API? I see that a hitTest can tell you whether you clicked on a model, and if so, what the lat/lon of your hit is. But surprisingly, it doesn't tell us which model was hit. Nor can I find any way to look up the model in Google 3D Warehouse using the lat/lon.

Can someone tell me a way to do this? Or is it for sure not allowed?

share|improve this question
add comment

1 Answer 1

Don't know if you can do this but a way around the problem would be to add placemarks as labels by objects which could be clicked to find out what an object is. It wouldn't be as elegant as the blue rollover behaviour (lots of placemarks hanging about cluttering the view and making rendering more complex) but it would work.

share|improve this answer
    
That's an interesting approach... How would I know what labels to put where? Essentially I'd be duplicating the whole Google 3D Warehouse, except replacing 3D shapes with points, right? Or is there some way to query the warehouse to find out what models are in a particular area? –  LarsH Dec 9 '10 at 12:51
    
I was assuming you were creating fresh content to behave like the warehouse buildings. If you want to use the actual data, as you point out, things get complex very quickly. –  Trevesy Dec 20 '10 at 22:36
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.