Skip to content

Instantly share code, notes, and snippets.

@here-devblog-gists
Created November 20, 2016 01:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save here-devblog-gists/97bbce9aa8f01590bc86697445488a72 to your computer and use it in GitHub Desktop.
Save here-devblog-gists/97bbce9aa8f01590bc86697445488a72 to your computer and use it in GitHub Desktop.
HERETrafficPanel.prototype.toggleTrafficData = function() {
if (this.state.showTraffic) {
this.map.removeLayer(this.trafficLayer);
} else {
this.map.addLayer(this.trafficLayer);
}
this.state.showTraffic = !this.state.showTraffic;
this.updatePanel();
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment