@@ -26,7 +26,7 @@ export class FireTweetLayer {
26
26
27
27
constructor ( private mainControl , private mapService : MapService , private map , private timeService : TimeService ) {
28
28
// This is the overlay controller defined in constructor
29
- //rewrite
29
+ // rewrite
30
30
this . mapService . getFireTweetData ( ) . subscribe ( this . tweetDataHandler ) ;
31
31
32
32
this . map . on ( 'overlayadd' , ( event ) => {
@@ -170,7 +170,7 @@ export class FireTweetLayer {
170
170
171
171
this . tweetData . forEach ( tweet => {
172
172
tempData . push ( [ tweet . lat , tweet . long ] ) ;
173
- }
173
+ }
174
174
) ;
175
175
176
176
this . tweetLayer . setData ( tempData ) ;
@@ -187,12 +187,17 @@ export class FireTweetLayer {
187
187
*/
188
188
this . tempDataWithID = [ ] ;
189
189
const [ startDateInMs , endDateInMs ] = this . timeService . getRangeDate ( ) ;
190
- this . timeService . getTweetByDate ( startDateInMs , endDateInMs ) . subscribe ( ( data ) => {
191
- console . log ( data ) ;
192
- this . tweetLayer . setData ( data ) ;
193
- } ) ;
194
- //console.log(startDateInMs);
195
- //console.log(this.timeService.getTweetByDate(startDateInMs, endDateInMs));
190
+ this . timeService . getTweetByDate ( startDateInMs , endDateInMs ) . subscribe ( tweets => {
191
+ const tempData = [ ] ;
192
+ tweets . forEach ( tweet => {
193
+ tempData . push ( [ tweet . lat , tweet . long ] ) ;
194
+ }
195
+ ) ;
196
+ this . tweetLayer . setData ( tempData ) ;
197
+ }
198
+ ) ;
199
+ // console.log(startDateInMs);
200
+ // console.log(this.timeService.getTweetByDate(startDateInMs, endDateInMs));
196
201
197
202
// this.tweetData.forEach(tweet => {
198
203
// const time = new Date(tweet.create_at).getTime();
@@ -201,8 +206,8 @@ export class FireTweetLayer {
201
206
// this.tempDataWithID.push([tweet.lat, tweet.long, tweet.id]);
202
207
// }
203
208
// });
204
- //console.log(tempData);
205
- //this.tweetLayer.setData(tempData); //draw on twittermap
209
+ // console.log(tempData);
210
+ // this.tweetLayer.setData(tempData); //draw on twittermap
206
211
}
207
212
208
213
idOverPoint ( x , y ) {
0 commit comments