Guest User

Untitled

a guest
Nov 14th, 2017
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. // Will grab a fusion table layer for each
  2. function getFusionTableLayer(mapLayer, fusiontableID) {
  3. var fusionLayer = new google.maps.FusionTablesLayer({
  4. query: {
  5. select: '*',
  6. from: fusiontableID
  7. }
  8. });
  9.  
  10. fusionLayer.setOptions({
  11. suppressInfoWindows: true,
  12. styles: [{
  13. where: '*',
  14. polygonOptions: {
  15. fillColor: '#ffffff',
  16. fillOpacity: 0.2,
  17. strokeColor: '#222222',
  18. strokeWeight: 1,
  19. strokeOpacity: 0.5,
  20. }
  21. }]
  22. });
  23. });
  24.  
  25. function setFusionLayerColors(candidate, opacity) {
  26. var styles = [];
  27. var strokeColor = '#555555';
  28. for (var i = 0; i < scale.length; i++) {
  29. styles.push({
  30. where: '\'' + candidate + '\' >= ' + scale[i],
  31. polygonOptions: {
  32. fillColor: scaleColors[i],
  33. fillOpacity: opacity,
  34. strokeColor: strokeColor,
  35. strokeWeight: 1,
  36. strokeOpacity: 1,
  37. }
  38. });
  39. }
  40. currentLayer.setOptions({
  41. 'styles': styles
  42. });
  43. }
Add Comment
Please, Sign In to add comment