openlayers.default_openlayers_styles.inc 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. <?php
  2. /**
  3. * @file
  4. * Provide default styles.
  5. */
  6. /**
  7. * Implements hook_default_openlayers_styles().
  8. */
  9. function openlayers_default_openlayers_styles() {
  10. $export = array();
  11. $ol_style = new stdClass();
  12. $ol_style->api_version = 1;
  13. $ol_style->machine_name = 'openlayers_style_default';
  14. $ol_style->name = 'Openlayers: Default';
  15. $ol_style->description = '';
  16. $ol_style->factory_service = 'openlayers.Style:Circle';
  17. $ol_style->options = array(
  18. 'default' => array(
  19. 'image' => array(
  20. 'radius' => 5,
  21. 'fill' => array(
  22. 'color' => '255,255,255,0.4',
  23. ),
  24. 'stroke' => array(
  25. 'color' => '51,153,204,1',
  26. 'width' => 1.25,
  27. 'lineDash' => '0,0',
  28. ),
  29. ),
  30. 'stroke' => array(
  31. 'color' => '51,153,204,1',
  32. 'width' => 1.25,
  33. 'lineDash' => '0,0',
  34. ),
  35. 'fill' => array(
  36. 'color' => '51,153,204,1',
  37. ),
  38. ),
  39. );
  40. $export['openlayers_style_default'] = $ol_style;
  41. $ol_style = new stdClass();
  42. $ol_style->disabled = FALSE; /* Edit this to true to make a default ol_style disabled initially */
  43. $ol_style->api_version = 1;
  44. $ol_style->machine_name = 'openlayers_style_select';
  45. $ol_style->name = 'Openlayers: Default select';
  46. $ol_style->description = '';
  47. $ol_style->factory_service = 'openlayers.Style:Circle';
  48. $ol_style->options = array(
  49. 'default' => array(
  50. 'image' => array(
  51. 'radius' => 5,
  52. 'fill' => array(
  53. 'color' => '51,153,204,0.7',
  54. ),
  55. 'stroke' => array(
  56. 'color' => '51,153,204,1',
  57. 'width' => 3,
  58. 'lineDash' => '0,0',
  59. ),
  60. ),
  61. 'stroke' => array(
  62. 'color' => '51,153,204,1',
  63. 'width' => 3,
  64. 'lineDash' => '0,0',
  65. ),
  66. 'fill' => array(
  67. 'color' => '51,153,204,0.7',
  68. ),
  69. ),
  70. );
  71. $export['openlayers_style_select'] = $ol_style;
  72. $ol_style = new stdClass();
  73. $ol_style->disabled = FALSE; /* Edit this to true to make a default ol_style disabled initially */
  74. $ol_style->api_version = 1;
  75. $ol_style->machine_name = 'openlayers_style_drag';
  76. $ol_style->name = 'Openlayers: Default drag';
  77. $ol_style->description = '';
  78. $ol_style->factory_service = 'openlayers.Style:Circle';
  79. $ol_style->options = array(
  80. 'default' => array(
  81. 'image' => array(
  82. 'radius' => 5,
  83. 'fill' => array(
  84. 'color' => '255,0,0,0.7',
  85. ),
  86. 'stroke' => array(
  87. 'color' => '255,0,0,1',
  88. 'width' => 3,
  89. 'lineDash' => '0,0',
  90. ),
  91. ),
  92. 'stroke' => array(
  93. 'color' => '255,0,0,1',
  94. 'width' => 3,
  95. 'lineDash' => '0,0',
  96. ),
  97. 'fill' => array(
  98. 'color' => '255,0,0,0.7',
  99. ),
  100. ),
  101. );
  102. $export['openlayers_style_drag'] = $ol_style;
  103. $ol_style = new stdClass();
  104. $ol_style->api_version = 1;
  105. $ol_style->machine_name = 'openlayers_style_invisible';
  106. $ol_style->name = 'Openlayers: Invisible';
  107. $ol_style->description = '';
  108. $ol_style->factory_service = 'openlayers.Style:Invisible';
  109. $export['openlayers_style_invisible'] = $ol_style;
  110. return $export;
  111. }