1 package com.lamatek.tags.google; 2 3 import java.io.Serializable ; 4 import java.util.Vector ; 5 6 import javax.servlet.jsp.tagext.BodyTagSupport ; 7 import javax.servlet.jsp.tagext.Tag ; 8 9 18 public class GoogleMapMarkerTag extends BodyTagSupport implements Serializable , GoogleMapEventListener { 19 20 String id = null; 21 String point = null; 22 InfoWindow infoWindow = null; 23 GoogleMapBlowupTag blowup = null; 24 Vector events = null; 25 GoogleMapIconTag icon = null; 26 boolean draggable = false; 27 30 public int doStartTag() { 31 Tag tag = this; 32 while (tag.getParent() != null) { 33 if (tag.getParent() instanceof GoogleMapTag) { 34 ((GoogleMapTag) tag.getParent()).addMarker(this); 35 return EVAL_BODY_INCLUDE; 36 } 37 tag = tag.getParent(); 38 } 39 return EVAL_BODY_INCLUDE; 40 } 41 44 public int doEndTag() { 45 return EVAL_PAGE; 46 } 47 53 public void addEvent(GoogleMapEventTag event) { 54 if (events == null) 55 events = new Vector (); 56 events.add(event); 57 } 58 65 public void setInfoWindow(InfoWindow infoWindow) { 66 this.infoWindow = infoWindow; 67 } 68 75 public void setBlowup(GoogleMapBlowupTag blowup) { 76 this.blowup = blowup; 77 } 78 83 public void setIcon(GoogleMapIconTag icon) { 84 this.icon = icon; 85 } 86 91 public InfoWindow getInfoWindow() { 92 return infoWindow; 93 } 94 99 public GoogleMapBlowupTag getBlowup() { 100 return blowup; 101 } 102 107 public String getId() { 108 return id; 109 } 110 115 public void setId(String id) { 116 this.id = id; 117 } 118 124 public String getPoint() { 125 return point; 126 } 127 133 public void setPoint(String point) { 134 this.point = point; 135 } 136 142 public Vector getEvents() { 143 return events; 144 } 145 150 public void setEvents(Vector events) { 151 this.events = events; 152 } 153 159 public GoogleMapIconTag getIcon() { 160 return icon; 161 } 162 167 public boolean isDraggable() { 168 return draggable; 169 } 170 176 public void setDraggable(boolean draggable) { 177 this.draggable = draggable; 178 } 179 } 180 | Popular Tags |