PageRenderTime 25ms CodeModel.GetById 22ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/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 
22 package com.google.maps.extras.markertracker
23{
24	public class MarkerTrackerOptions {
25		
26		
27	 /**
28	  * Scales the icon size by this value, 0 = no icon.
29	  * @see MarkerTracker#DEFAUT_ICON_SCALE
30	  */
31	 public var iconScale:Number;
32	 
33	 /**
34      * The padding between the arrow and the edge of the map.
35      * @see MarkerTracker#DEFAULT_PADDING
36      */
37	 public var padding:Number;
38	 
39	 /**
40	  * The color of the arrow.
41	  * @see MarkerTracker#DEFAUT_ARROW_COLOR
42	  */
43	 public var arrowColor:Number;
44	 
45	 /**
46      * The thickness of the lines that make up the arrows.
47      * @see MarkerTracker#DEFAUT_ARROW_WEIGHT
48      */
49	 public var arrowWeight:Number;
50	 
51	 /**
52      * The length of the arrow.
53      * @see MarkerTracker#DEFAUT_ARROW_LENGTH
54      */
55	 public var arrowLength:Number;
56	 
57	 /**
58      * The opacity of the arrow.
59      * @see MarkerTracker#DEFAUT_ARROW_OPACITY
60      */
61	 public var arrowOpacity:Number;
62	 
63	 /**
64      * The Map event that triggers the arrows to update.
65      * @see MarkerTracker#DEFAUT_UPDATE_EVENT
66      */
67	 public var updateEvent:String;
68	 
69	 /**
70      * The Marker event that triggers a quick zoom to the tracked marker. 
71      * @see MarkerTracker#DEFAUT_PAN_EVENT
72      */
73	 public var panEvent:String;
74	 
75	 /**
76      * Setting this value to false will disable a quick pan.
77      * @see MarkerTracker#DEFAUT_QUICK_PAN_ENABLED
78      */
79	 public var quickPanEnabled:Boolean;
80	 
81	 public function MarkerTrackerOptions(params:Object = null) {
82	 	if (params == null) return;
83	 	
84	 	var propList:Array = ["iconScale", "padding", "arrowColor", "arrowWeight", 
85	 	     "arrowLength", "updateEvent", "panEvent", "quickPanEnabled"];
86        for (var i:Number = 0; i < propList.length; i++) {
87            var propName:String = propList[i];
88            this[propName] = params[propName];
89        }
90    }
91  }
92}