progresive loading

15 views
Skip to first unread message

chao

unread,
Aug 6, 2012, 2:43:17 PM8/6/12
to timemap-d...@googlegroups.com
Hi Nick,

 I am a new user for time map and have some question about progressive loading
1. does progressive loading must be have a remote service like all the url things? I am a beginner of javascript and almost know nothing about php, so I just wandering  is it possible to load the data locally like:

tm = TimeMap.init({
    mapId: "map",               // Id of map div element (required)
    timelineId: "timeline",     // Id of timeline div element (required)
        datasets: [
{
            type: "basic",
                options: {
                    items: items,
                    infoTemplate: items.infoTemplate,
                    // use the transformFunction to add the theme before loading
                    url: "mydata.json",

                                        start: "2012-03-17",  
                                        
dataMinDate: "2004-10-15",


interval: 10368000000,
// function to turn date into string appropriate for service
formatDate: function(d) {
return TimeMap.util.formatDate(d, 1);
}

                                       transformFunction: function(item) {
                        //theme for the icon
                        item.options.theme="adaraIconType"+"airport_s"+"-"+parseInt(item.options.Iconindex);
                        return item;
                    }
                }
            }
        ],
        bandIntervals: 'hr'
        
    });

And what's the content  for the json file

is that like:

{
{obj1},
{obj2},
{obj3},
....
}



Reply all
Reply to author
Forward
0 new messages