/src/com/google/maps/extras/markertracker/MarkerTrackerOptions.as

http://gmaps-utility-library-flash.googlecode.com/ · ActionScript · 92 lines · 23 code · 13 blank · 56 comment · 3 complexity · 907de8067eda403d138515ec240265b3 MD5 · raw file

  1. /**
  2. * MarkerTracker v1.0
  3. * Author: Michael Menzel
  4. * Email: mugglmenzel@gmail.com
  5. *
  6. * Copyright 2009 Michael Menzel
  7. *
  8. * Licensed under the Apache License, Version 2.0 (the "License");
  9. * you may not use this file except in compliance with the License.
  10. * You may obtain a copy of the License at
  11. *
  12. * http://www.apache.org/licenses/LICENSE-2.0
  13. *
  14. * Unless required by applicable law or agreed to in writing, software
  15. * distributed under the License is distributed on an "AS IS" BASIS,
  16. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  17. * See the License for the specific language governing permissions and
  18. * limitations under the License.
  19. *
  20. */
  21. package com.google.maps.extras.markertracker
  22. {
  23. public class MarkerTrackerOptions {
  24. /**
  25. * Scales the icon size by this value, 0 = no icon.
  26. * @see MarkerTracker#DEFAUT_ICON_SCALE
  27. */
  28. public var iconScale:Number;
  29. /**
  30. * The padding between the arrow and the edge of the map.
  31. * @see MarkerTracker#DEFAULT_PADDING
  32. */
  33. public var padding:Number;
  34. /**
  35. * The color of the arrow.
  36. * @see MarkerTracker#DEFAUT_ARROW_COLOR
  37. */
  38. public var arrowColor:Number;
  39. /**
  40. * The thickness of the lines that make up the arrows.
  41. * @see MarkerTracker#DEFAUT_ARROW_WEIGHT
  42. */
  43. public var arrowWeight:Number;
  44. /**
  45. * The length of the arrow.
  46. * @see MarkerTracker#DEFAUT_ARROW_LENGTH
  47. */
  48. public var arrowLength:Number;
  49. /**
  50. * The opacity of the arrow.
  51. * @see MarkerTracker#DEFAUT_ARROW_OPACITY
  52. */
  53. public var arrowOpacity:Number;
  54. /**
  55. * The Map event that triggers the arrows to update.
  56. * @see MarkerTracker#DEFAUT_UPDATE_EVENT
  57. */
  58. public var updateEvent:String;
  59. /**
  60. * The Marker event that triggers a quick zoom to the tracked marker.
  61. * @see MarkerTracker#DEFAUT_PAN_EVENT
  62. */
  63. public var panEvent:String;
  64. /**
  65. * Setting this value to false will disable a quick pan.
  66. * @see MarkerTracker#DEFAUT_QUICK_PAN_ENABLED
  67. */
  68. public var quickPanEnabled:Boolean;
  69. public function MarkerTrackerOptions(params:Object = null) {
  70. if (params == null) return;
  71. var propList:Array = ["iconScale", "padding", "arrowColor", "arrowWeight",
  72. "arrowLength", "updateEvent", "panEvent", "quickPanEnabled"];
  73. for (var i:Number = 0; i < propList.length; i++) {
  74. var propName:String = propList[i];
  75. this[propName] = params[propName];
  76. }
  77. }
  78. }
  79. }