Changeset 291 in tmcsimulator for trunk/src/cptms
- Timestamp:
- 03/02/2019 03:08:18 PM (7 years ago)
- Location:
- trunk/src/cptms
- Files:
-
- 2 deleted
- 2 edited
-
cptms_map_v55.html (modified) (6 diffs)
-
highways.json (deleted)
-
scaling_dotsize_prototype.html (modified) (1 diff)
-
stms_map_v54a.html (deleted)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/cptms/cptms_map_v55.html
r286 r291 82 82 // Dot colors used in traffic model to indicate free-flowing, slowed, and stopped traffic 83 83 // and their associated zvalues so slower traffic dots are more visible. 84 var colorZvalues = {"lime":10,"yellow":20,"red":30}; 84 // white means a disabled spot 85 var colorZvalues = {"white":5,"lime":10,"yellow":20,"red":30}; 85 86 86 87 // Build a solid colored icon to use instead of the classic pin … … 116 117 map.data.setStyle(function(feature) 117 118 { 118 //console.log(feature.getId() + " " + feature.getGeometry().get());119 119 // Get the postmile id 120 120 var name = feature.getId(); … … 152 152 function calcDistanceFactor() 153 153 { 154 // 15 is maximum zoom, the point at which no adjus ment is needed154 // 15 is maximum zoom, the point at which no adjustment is needed 155 155 return (.0005*(15-map.getZoom())); 156 156 } … … 162 162 function adjustCoords(adjAmount) 163 163 { 164 //console.log("adjusting coordinates");165 164 // Adjust the NB points a slight amount 166 165 map.data.forEach(function(feature) … … 195 194 // set zIndex for slowed traffic to a higher value so they overlap 196 195 currentFeature.setProperty("zIndex", colorZvalues[newColor]); 197 //console.log(target+" updated to "+newColor);198 196 } 199 197 } … … 341 339 // fetch how much the map is currently zoomed 342 340 currentZoom = map.getZoom(); 343 //console.log("Zoom changed to ",currentZoom);344 341 // only bother adjusting within this range 345 342 if ((currentZoom <16) && (currentZoom>10)) -
trunk/src/cptms/scaling_dotsize_prototype.html
r284 r291 7 7 /* Set the size of the div element that contains the map */ 8 8 #mapdiv { 9 height: 550px; // or height: 100%9 height: 550px; 10 10 width: 100%; 11 11 }
Note: See TracChangeset
for help on using the changeset viewer.
