cgxp.plugins.LocationChooser

ptype
cgxp_locationchooser
class cgxp.plugins.LocationChooser(config)

Tip: if this tool must be placed in the map.bbar, the bbar must be initialized in the map object definition: “bbar: []”.

Example Use

Sample code showing how to add a LocationChooser plugin to a gxp.Viewer:

new gxp.Viewer({
    ...
    tools: [{
     ptype: "cgxp_locationchooser",
     actionTarget: "center.tbar",
     locations: {
         'Location A': INITIAL_EXTENT,
         'Location B': [722421, 5860095, 747129, 5869764],
         ...
         'Location Z': [616074, 5699359, 714907, 5738036]
    }]
    ...
});

Note that the “locations” labels are automatically internationalized if a translation exists in the “Lang” files.

Config Options

Configuration properties.

locations

Object A key-value (‘Label’: [b,b,o,x]) object that defines the locations

width

Number Combo box width in px.

Table Of Contents

Previous topic

cgxp.plugins.Legend

Next topic

cgxp.plugins.Login

This Page

Fork me on GitHub