I am learning to make a web GIS using OpenGeo Suite-SDK. I have been trying to get the google earth plugin to work but I still fail to make it. I read from http://dev.horizon.opengeo.org/opengeo-docs/sdk-api/lib/plugins/GoogleEarth.html, that it can work if portalItems of gxp.Viewer is set up in certain way.

I would like to ask you where should I put portalItems? Should I replace items: with portalItems: ?

Thank you.


You can simply change the portalConfig in app.js:

portalConfig: {
    layout: "border",
    region: "center",

    // by configuring items here, we don't need to configure portalItems
    // and save a wrapping container
    items: [{
        id: "centerpanel",
        xtype: "panel",
        layout: "card",
        region: "center",
        activeItem: 0,
        border: false,
        items: [
            "mymap", {
                xtype: 'gxp_googleearthpanel',
                mapPanel: "map"
    }, {
        id: "westpanel",
        xtype: "container",
        layout: "fit",
        region: "west",
        width: 200
    bbar: {id: "mybbar"}
| improve this answer | |
  • Dear @ahocevar : Thank you for your explanation. Actually, I missed the important things, that I should include the required widgets and plugins (GoogleEarthPanel.js, GoogleEarth.js and GoogleSource.js). Also, I modified "mymap" to "map". I post my code in pastebin [link] pastebin.com/6A2yGuuX, just in case there is anybody who find similar problems. – Firman Hadi May 10 '13 at 14:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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