File tree Expand file tree Collapse file tree
Vector tiles/Vector tile heat map Expand file tree Collapse file tree Original file line number Diff line number Diff line change 120120 label : 'Code samples' ,
121121 hideLabel : true ,
122122 hyperlinkFormat : {
123- lable : 'Go to code samples!' ,
123+ label : 'Go to code samples!' ,
124124 target : '_blank'
125125 }
126126 } ,
152152 {
153153 propertyPath : 'imageLink' ,
154154 label : 'Image' ,
155- hideImageLabel : true ,
155+ hideLabel : true ,
156156 hyperlinkFormat : {
157157 isImage : true
158158 }
Original file line number Diff line number Diff line change 5757 } ) ;
5858 map . sources . add ( datasource ) ;
5959
60- //Create a layer for traffic flow lines .
61- var flowLayer = new atlas . layer . HeatMapLayer ( datasource , null , {
60+ //Create a layer for a traffic flow heat map .
61+ var heatMapLayer = new atlas . layer . HeatMapLayer ( datasource , null , {
6262 //The name of the data layer within the data source to pass into this rendering layer.
6363 sourceLayer : 'Traffic flow' ,
6464
7373 filter : [ '<' , [ 'get' , 'traffic_level' ] , 0.80 ]
7474 } ) ;
7575
76- //Add the traffic flow layer below the labels to make the map clearer.
77- map . layers . add ( flowLayer , 'labels' ) ;
78-
79- //Add a click event to the layer to display details about the traffic flow line.
80- map . events . add ( 'click' , flowLayer , featureClicked ) ;
76+ //Add the traffic flow heat map layer below the labels to make the map clearer.
77+ map . layers . add ( heatMapLayer , 'labels' ) ;
8178 } ) ;
8279 }
8380
You can’t perform that action at this time.
0 commit comments