1. #1
    Sencha User
    Join Date
    Nov 2012
    Posts
    25
    Vote Rating
    0
    Answers
    3
    xiii29 is on a distinguished road

      0  

    Default Unanswered: Ext.Map Zoom trouble

    Unanswered: Ext.Map Zoom trouble


    Hi,
    I'm trying to set up a map in some Panel and i've difficulties to set up the default zoom ...

    Example :
    Code:
    Ext.define("MyApp.view.Map.MapPanel", {
         extend: 'Ext.Panel',
         xtype: 'mapcard',
    
    
         config: {
           iconCls: 'globe1', title: 'Carte',
           items: [
               {
                      xtype:'toolbar',
                      title:'Carte',
                      items: [
                        { xtype:'spacer', },
                        { xtype:'button', text:'Refresh', iconCls:'refresh', iconMask:'true', id:'refreshMapButton' }
                      ], //toolbar items
                      docked: 'top',
               },
               {
                    xtype:'map',
                    id:'globalmap',
                    mapOptions: {
                        zoom:                 10,
                    }, // mapOptions
               },
           ],
           layout:'fit',
         }, // config
    }); // fin
    In the controller, I only center the map :
    Code:
    // Activation de la carte
       onMapRender: function(source, map, eOpts) {
             
             this.getMap().setMapCenter( { latitude: 47.217316595885734, longitude: -1.5465397033691520 } );
    
             // Another way of Zooming ?
             var map = this.getMap().getMap();
             map.setZoom(10);
    
    var klTronconBF = new google.maps.KmlLayer(
    				'http://mykml.kml',
    				);
          klTronconBF.setMap(map);
    
    
       },
    Any ideas ?

  2. #2
    Sencha User
    Join Date
    Nov 2012
    Posts
    25
    Vote Rating
    0
    Answers
    3
    xiii29 is on a distinguished road

      0  

    Default


    I've tryied to set my kml on this web site :
    http://display-kml.appspot.com/


    R
    esults seems ok.

Tags for this Thread