cgxp.plugins.GoogleEarthView

ptype
cgxp_googleearthview
class cgxp.plugins.GoogleEarthView(config)

GoogleEarthView provides a toolbar button that toggles a GoogleEarthPanel view of the map.

Example Use

Sample code showing how to add the GoogleEarth plugins to a gxp.Viewer:

new gxp.Viewer({
    portalConfig: {
        layout: "border",
        // by configuring items here, we don't need to configure portalItems
        // and save a wrapping container
        items: [{
            region: "north",
            contentEl: 'header-out'
        },
        {
            region: 'center',
            layout: 'border',
            id: 'center',
            tbar: [],
            items: [
                "app-map"
            ]
        },
        {
            id: "featuregrid-container",
            xtype: "panel",
            layout: "fit",
            region: "south",
            height: 160,
            split: true,
            collapseMode: "mini",
            hidden: true,
            bodyStyle: 'background-color: transparent;'
        },
        {
            layout: "accordion",
            id: "left-panel",
            region: "west",
            width: 300,
            minWidth: 300,
            split: true,
            collapseMode: "mini",
            border: false,
            defaults: {width: 300},
            items: [{
                xtype: "panel",
                title: OpenLayers.i18n("layertree"),
                id: 'layerpanel',
                layout: "vbox",
                layoutConfig: {
                    align: "stretch"
                }
            }]
        }]
    },
    tools: [{
        ptype: "cgxp_googleearthview",
        showRoadsLayer: true,
        showBuildingsLayer: true,
        showBordersLayer: true,
        showTerrainLayer: true,
        showTreesLayer: true,
        toggleGroup: "maptools",
        outputTarget: "center",
        actionTarget: "center.tbar"
    },
    ...
    {
        ptype: "cgxp_menushortcut",
        actionTarget: "center.bbar",
        type: '->'
    },
    {
        ptype: "cgxp_addkmlfile",
        echoUrl: "${request.route_url('echo')}",
        actionTarget: "center.bbar"
    }]
    ...
});

Config Options

Configuration properties.

actionConfig

Object Config object for the action created by this plugin.

activateToggleGroup

String The name of the activate toggle group this tool is in. Default is “clickgroup”.

showBordersLayer

Boolean or null Enable or disable the Google Earth Plugin’s built-in borders layer. Set this to one of three values:

  • true: force layer to be enabled
  • false: force layer to be disabled
  • null: leave layer as default
showBuildingsLayer

Boolean or null Enable or disable the Google Earth Plugin’s built-in buildings layer. See comments for showBordersLayer above.

showBuildingsLowResolutionLayer

Boolean or null Enable or disable the Google Earth Plugin’s built-in low resolution buildings layer. See comments for showBordersLayer above.

showRoadsLayer

Boolean or null Enable or disable the Google Earth Plugin’s built-in roads layer. See comments for showBordersLayer above.

showTerrainLayer

Boolean or null Enable or disable the Google Earth Plugin’s built-in terrain layer. See comments for showBordersLayer above.

showTreesLayer

Boolean or null Enable or disable the Google Earth Plugin’s built-in trees layer. See comments for showBordersLayer above.

Public Properties

Public properties.

GoogleEarthView.kmlList

List to store kml strings to be able to load them into GoogleEarth when it is ready.

Table Of Contents

Previous topic

cgxp.plugins.GetFeature

Next topic

cgxp.plugins.GoogleSource

This Page

Fork me on GitHub