3

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?

1 Answer 1

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.

2
  • 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, 2010 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, 2010 at 22:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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