We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For example in https://github.com/andrea-cuttone/geoplotlib/blob/master/examples/follow_camera.py, changing the bottom part to:
otherdata = read_csv('data/taxi.csv') geoplotlib.dot(otherdata) geoplotlib.add_layer(TrailsLayer()) geoplotlib.show()
leads to the dot map not being displayed. This is because the following happens:
in fact, invalidating the layers at every frame (for example in https://github.com/andrea-cuttone/geoplotlib/blob/master/geoplotlib/core.py#L229).
The code should be changed so that changes in the projection are propagated to all layers.
A workaround for now is to render the dots in the same method where the projection is modified, using two separate painters:
def draw(self, proj, mouse_x, mouse_y, ui_manager): df = self.data.where((self.data['timestamp'] > self.t) & (self.data['timestamp'] <= self.t + 30*60)) proj.fit(BoundingBox.from_points(lons=df['lon'], lats=df['lat']), max_zoom=14) allx, ally = proj.lonlat_to_screen(self.data['lon'], self.data['lat']) self.painter = BatchPainter() self.painter.set_color([255,0,0]) self.painter.points(allx, ally) self.painter.batch_draw() x, y = proj.lonlat_to_screen(df['lon'], df['lat']) self.painter = BatchPainter() self.painter.set_color([0,0,255]) self.painter.linestrip(x, y, 10) self.t += 30 if self.t > self.data['timestamp'].max(): self.t = self.data['timestamp'].min() self.painter.batch_draw() ui_manager.info(epoch_to_str(self.t))
Thanks to Zhicheng Liu for reporting the issue.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
For example in https://github.com/andrea-cuttone/geoplotlib/blob/master/examples/follow_camera.py, changing the bottom part to:
leads to the dot map not being displayed. This is because the following happens:
in fact, invalidating the layers at every frame (for example in https://github.com/andrea-cuttone/geoplotlib/blob/master/geoplotlib/core.py#L229).
The code should be changed so that changes in the projection are propagated to all layers.
A workaround for now is to render the dots in the same method where the projection is modified, using two separate painters:
Thanks to Zhicheng Liu for reporting the issue.
The text was updated successfully, but these errors were encountered: