| 1 package com.lamatek.tags.google; 2 3 import javax.servlet.jsp.tagext.Tag ; 4 import javax.servlet.jsp.tagext.TagSupport ; 5 6 15 public class GoogleMapWMSTag extends TagSupport { 16 17 String id = null; 18 String name = null; 19 String url = null; 20 String layers = null; 21 String srs = "EPSG:4326"; 22 String version = "1.1.1"; 23 String format = "image/jpeg"; 24 boolean showOnStartup = true; 25 String pathToScript = null; 26 boolean showOverlay = false; 27 String copyright = "(c) Unknown"; 28 31 public int doStartTag() { 32 Tag tag = this; 33 while (tag.getParent() != null) { 34 if (tag.getParent() instanceof GoogleMapTag) { 35 ((GoogleMapTag) tag.getParent()).addWMSTag(this); 36 return SKIP_BODY; 37 } 38 tag = tag.getParent(); 39 } 40 return SKIP_BODY; 41 } 42 47 public String getFormat() { 48 return format; 49 } 50 56 public void setFormat(String format) { 57 this.format = format; 58 } 59 64 public String getId() { 65 return id; 66 } 67 72 public void setId(String id) { 73 this.id = id; 74 } 75 81 public String getLayers() { 82 return layers; 83 } 84 89 public void setLayers(String layers) { 90 this.layers = layers; 91 } 92 97 public String getName() { 98 return name; 99 } 100 104 public void setName(String name) { 105 this.name = name; 106 } 107 112 public boolean isShowOnStartup() { 113 return showOnStartup; 114 } 115 120 public void setShowOnStartup(boolean showOnStartup) { 121 this.showOnStartup = showOnStartup; 122 } 123 128 public String getSrs() { 129 return srs; 130 } 131 136 public void setSrs(String srs) { 137 this.srs = srs; 138 } 139 145 public String getUrl() { 146 return url; 147 } 148 153 public void setUrl(String url) { 154 if (url.indexOf("?") < 0) 155 this.url = url + "?"; 156 else 157 this.url = url; 158 } 159 164 public String getVersion() { 165 return version; 166 } 167 172 public void setVersion(String version) { 173 this.version = version; 174 } 175 181 public String getPathToScript() { 182 return pathToScript; 183 } 184 190 public void setPathToScript(String pathToScript) { 191 this.pathToScript = pathToScript; 192 } 193 198 public boolean isShowOverlay() { 199 return showOverlay; 200 } 201 207 public void setShowOverlay(boolean showOverlay) { 208 this.showOverlay = showOverlay; 209 } 210 216 public String getCopyright() { 217 return copyright; 218 } 219 225 public void setCopyright(String copyright) { 226 this.copyright = copyright; 227 } 228 } 229 | Popular Tags |