Results 1 to 4 of 4

Thread: Ext.each setting time for adding data

  1. #1

    Question Ext.each setting time for adding data

    hi ,

    i am working with extjs and openlayers . i can add my data with below code.. but i want to add my data with 1 sec intervals... so second data will be added after 1 sec from first data...

    Code:
    Ext.each(features, function(s) {
    var point = new OpenLayers.Geometry.Point(s.coord[0],s.coord[1]);
    var add_point = new OpenLayers.Feature.Vector(point,null,null);
    
    map.vectorlayer.addFeatures(add_point);
    
    }];

    with this code all point is added completely. i want some time interval between points

    thks

  2. #2
    Sencha User fay's Avatar
    Join Date
    Apr 2007
    Location
    Ireland
    Posts
    1,750

    Default

    Have you looked at Ext.TaskMgr? The start method can take an interval (frequency in milliseconds with which the task should be invoked) and repeat (number of times to invoke the task before stopping automatically), which might meet your requirement.

  3. #3

    Arrow

    because of decoding json data then adding with ext.each, ext task didnt work for me ..
    thks...

  4. #4
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,392

    Default

    Code:
    Ext.each(features, function(s) {
        .....
    }.defer(1000));
    Never used it inside Ext.each but could work but I also doubt it leaning toward the doubt it. May just need to use setTimeout to go over things.
    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

Posting Permissions

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