Results 1 to 2 of 2

Thread: Map with Toolbar

  1. #1
    Sencha User
    Join Date
    Jun 2009
    Vote Rating

    Default Map with Toolbar

    I need to get a Toolbar docked on a Map panel, but I notice there is no items config item for me to add a toolbar object.

    I'm using MVC and so have my view defined like so:

    Ext.define('PinpointersTouch.view.GMap', {
        extend: 'Ext.Map',
        xtype: 'gmap',
        config: {
            useCurrentLocation: false,
            fullscreen: true,
            id: 'mainMap'
    		// items: [{
    			// xtype: 'toolbar',
    			// docked: 'top',
    			// items: [{
    				// xtype: 'label',
    				// html: 'Show:',
    				// style: 'color:white;'
    			// },{
    				// xtype: 'selectfield',
    				// store: 'TrackingListWithShowAll',
    				// displayField: 'UnitName',
    				// valueField: 'id',
    				// itemId: 'selectVehicle'
    			// }]
    		// }]      
    Just thinking, would I be best off actually using a panel with two child items, one being the Map and one the Toolbar? Seems like I'm over nesting then though??

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Gainesville, FL
    Vote Rating


    Ext.Map is a subclass (extends from) of Ext.Component. You have to be a subclass of Ext.Container in order to use docked components. Therefor you cannot have docked components in an Ext.Map. You will need to wrap your Ext.Map in an Ext.Container, use layout : 'fit' and add docked components both to the Ext.Container.
    Mitchell Simoens @LikelyMitch
    Modus Create, Senior Frontend Engineer
    Need any sort of Ext JS help? Modus Create is here to help!

    Check out my GitHub:

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts