Results 1 to 3 of 3

Thread: Can't draw polyline on google map in ExtJs 4

  1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    3
    Vote Rating
    0
      0  

    Default Can't draw polyline on google map in ExtJs 4

    Hi. I use ExtJS 4 with GMapPanel3. When I use method addPolyline I see error message - "An invalid or illegal string was specified" code: "12". What I do wrong?

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,381
    Answers
    3997
    Vote Rating
    1536
      0  

    Default

    1. I moved this to the Q&A forum.
    2. Can't know what you did wrong with not know what you did. Although this is probably an issue for google maps not Ext JS 4.
    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:
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    3
    Vote Rating
    0
      0  

    Default

    I use plugin by VinylFox for google map - GMapPanel3. And when I use method addPolyline I see error message - "An invalid or illegal string was specified" code: "12".
    This code window with map.
    Code:
    function showMap(){      $.post('scripts/show_general_settings.php',function(data)
         {  
             
           if(!mapwin){
           
           var values=data.split("/n");
                mapwin = Ext.create('Ext.Window', {
                    layout: 'fit',
                    title: 'Google ?????',
                    closeAction: 'hide',
                    width:600,
                    height:600,
                    border: false,
                    x: 40,
                    y: 60,
                    items: [{
                        xtype: 'gmappanel',
                        id: 'mymap',
                        zoomLevel: parseInt(values[4]),
                        gmapType: 'map',
                        mapConfOpts: ['enableScrollWheelZoom','enableDoubleClickZoom','enableDragging'],
                        mapControls: ['GSmallMapControl','GMapTypeControl'],
                        setCenter: {
                            lat:49.0321,//values[2],
                            lng:24.433829999999944//values[3] 
                        }
                 }
                    ]
                });
            
            
          
            
    
    
            mapwin.show();
        });       
    
    }


    This code add polyline
    Code:
    $.post('scripts/Monitoring.php',{array_of_imei:car_data,CurrTime:'2011-11-29 17:08:14',PrevTime:'2011-11-29 17:07:14'}, function(data)    {
            points=data.split("\n");
            $.each(points,function(key,value)
            {
                point=value.split("\t");
                var point_line = new Object();
                point_line.lat=point[0];
                point_line.lng=point[1];     
                data_point.push(point_line);
    
            });
    var map_googl=Ext.getCmp('mymap');  
    map_googl.addPolyline(data_point,{strokeColor: '#FF0000',strokeOpacity: 1.0,strokeWeight: 6} );


Posting Permissions

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