ISG-ICS / cloudberry

Big Data Visualization
http://cloudberry.ics.uci.edu
90 stars 82 forks source link

TwitterMap App Fails to work when the *first* UI interaction is a drag #365

Closed anmaikul closed 7 years ago

anmaikul commented 7 years ago

I've noticed that the TwitterMap app fails to work when the first UI interaction is a drag. After a drag, query results will not display on the map. Dragging does work fine though if you do a query search first.

In map/controllers.js. the callback function passed in when calling $scope.$on("leafletDirectiveMap.dragend...", breaks when geoData has not been set yet.

Perhaps test if geoData has been set before running the last chunk of code?

 if (geoData) {  
       if ($scope.status.logicLevel === 'city') {
          loadCityJsonByBound(onEachFeature);
        }
        resetGeoIds($scope.bounds, geoData, $scope.status.logicLevel + "ID");
        cloudberry.parameters.geoLevel = $scope.status.logicLevel;
        cloudberry.queryType = 'drag';
        cloudberry.query(cloudberry.parameters, cloudberry.queryType);
      });
  }
JavierJia commented 7 years ago

I think this issue has been fixed by @HotLemonJuice as #343. Does it still appear on your local master? The online demo is a little lag behind the master though.

anmaikul commented 7 years ago

Ah, OK. My local master is a few weeks behind. Thanks.

JavierJia commented 7 years ago

@anmaikul can I close this issue since it was resolved?