Configuring WEC Map to use different icons for each group


/ Published in: TYPO3
Save to your folder(s)

The TypoScript below assumes that the WEC Table Map plugin is set up to display tt_address records, with one group for hotels and one group for a conference venue. The resulting map shows location icons based on the address group.


Copy this code and paste it in your HTML
  1. plugin.tx_wecmap_pi3.tables.10 {
  2. table = tt_address
  3. join = JOIN tt_address_group_mm AS tta_txagg_mm ON tt_address.uid = tta_txagg_mm.uid_local
  4.  
  5. # Hotels
  6. where = uid_foreign=6
  7.  
  8. icon {
  9. iconID = lodging
  10. anchorX = 0
  11. anchorY = 0
  12. infoAnchorX = 5
  13. infoAnchorY = 1
  14.  
  15. imagepath = http://maps.google.com/intl/en_us/mapfiles/ms/micons/lodging.png
  16. width = 32
  17. height = 32
  18.  
  19. shadowpath = http://maps.google.com/intl/en_us/mapfiles/ms/micons/lodging.shadow.png
  20. shadowWidth = 59
  21. shadowHeight = 32
  22. }
  23.  
  24. # config for description
  25. description = COA
  26. description {
  27. 10 = COA
  28. 10 {
  29. 10 = TEXT
  30. 10.field = address
  31. 10.wrap = |<br />
  32. 10.if.isTrue.field = address
  33.  
  34. 20 = TEXT
  35. 20.field = city
  36. 20.wrap = |,&nbsp;
  37. 20.if.isTrue.field = city
  38.  
  39. 30 = TEXT
  40. 30.field = state
  41. 30.wrap = |&nbsp;
  42. 30.if.isTrue.field = state
  43.  
  44. 40 = TEXT
  45. 40.field = zip
  46.  
  47. 50 = TEXT
  48. 50.value = Phone: {field:phone}
  49. 50.wrap = <br /><br />|
  50. 50.if.isTrue.field = phone
  51. 50.insertData = true
  52. }
  53.  
  54. 10.wrap = <div>|</div>
  55. }
  56. }
  57.  
  58. plugin.tx_wecmap_pi3.tables.20 < plugin.tx_wecmap_pi3.tables.10
  59. plugin.tx_wecmap_pi3.tables.20 {
  60. # Travel = 5
  61. where = uid_foreign=5
  62.  
  63. icon {
  64. iconID = travel
  65. imagepath = http://maps.google.com/intl/en_us/mapfiles/ms/micons/plane.png
  66. shadowpath = http://maps.google.com/intl/en_us/mapfiles/ms/micons/plane.shadow.png
  67. }
  68. }
  69.  
  70. plugin.tx_wecmap_pi3.tables.30 < plugin.tx_wecmap_pi3.tables.10
  71. plugin.tx_wecmap_pi3.tables.30 {
  72. # Conference Venue = 4
  73. where = uid_foreign=4
  74.  
  75. icon {
  76. iconID = venue
  77. imagepath = http://maps.google.com/intl/en_us/mapfiles/ms/micons/flag.png
  78. shadowpath = http://maps.google.com/intl/en_us/mapfiles/ms/micons/flag.shadow.png
  79. }
  80. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.