Search code examples
kmlgoogle-earth-plugin

Model won't display in GE Plugin Tour Player


Does the GE Plugin Tour Player feature support showing a model from a .kmz file? If so I'm not able to get that to work.

Here is a test page I have set up: http://www.ppacg.org/google_earth/ds/tip/8th-Street-Tour-Model.html

There is a model in this .kmz showing a future highway improvement. This model displays on the tour when using the Desktop GE application, but not on the GE Plugin. I checked the paths on and and they look okay. I used this code from the Google Earth API Samples - Playing Tours for my starting point: http://earth-api-samples.googlecode.com/svn/trunk/examples/tour-player.html

Thanks in advance for any help you can provide!

paul


Solution

  • I tested the page an the Tour works perfectly. That said you do have a couple of errors on the page.

    Firstly, remove the line

    document.getElementById('installed-plugin-version').innerHTML =
      ge.getPluginVersion().toString();
    

    It is giving the error

    Uncaught TypeError: Cannot set property 'innerHTML' of null
    

    Also, the path to the css file is incorrect. You have

    http://earth-api-samples.googlecode.com/svn/trunk/examples/static/prettify.css
    

    It should be

    http://earth-api-samples.googlecode.com/svn/trunk/examples/static/prettify/prettify.css
    

    Finally, instead of using the lines

    var href = window.location.href.substring(0, window.location.href.lastIndexOf('/')) + '/';
        href += '../8thStreet1a.kmz';
    

    You could just directly link to the file:

    var href = "http://www.ppacg.org/google_earth/ds/8thStreet1a.kmz"