Note that there are some explanatory texts on larger screens.

plurals
  1. POMap in Ext.Window.window show not fully
    primarykey
    data
    text
    <p>I created extended Ext.Panel.panel component containing maps showing through openlayers, this component is located in Ext.Window.window. But after load page, map showing only partly: <a href="http://habrastorage.org/storage2/17f/1be/3bd/17f1be3bdc2a9765c1852d93a95ee1b8.png" rel="nofollow">http://habrastorage.org/storage2/17f/1be/3bd/17f1be3bdc2a9765c1852d93a95ee1b8.png</a></p> <pre><code>Ext.define('MA.view.components.OpenlayersPanel', { extend: 'Ext.panel.Panel', alias: 'widget.openlayerspanel', multiSelect: true, initComponent: function() { this.callParent(arguments); this.on('afterrender', this.afterRender, this); }, afterRender: function() { this.map = new OpenLayers.Map(this.body.dom.id); this.layer = new OpenLayers.Layer.OSM('OSM Map'); this.fromProjection = new OpenLayers.Projection("EPSG:4326"); this.toProjection = new OpenLayers.Projection("EPSG:900913"); this.position = new OpenLayers.LonLat(75.1, 61.15).transform(this.fromProjection, this.toProjection); this.zoom = 12; this.map.addLayer(this.layer); this.layer.setIsBaseLayer(true); this.map.setCenter(this.position, this.zoom); } }); </code></pre> <p>app.js:</p> <pre><code>Ext.application( { requires: ['Ext.container.Viewport'], name: 'MA', appFolder: 'app', controllers: [ 'Map' ], launch: function() { Ext.create('Ext.window.Window', { layout: { type: 'vbox' }, items: [ { xtype: 'openlayerspanel' }, { xtype: 'button', text: 'Load', } ] }).show(); } }); </code></pre> <p>When i resize browser, map is refresh and show normally. What's fix to make it work?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload