001
014
015 package com.liferay.taglib.ui;
016
017 import com.liferay.taglib.util.IncludeTag;
018
019 import javax.servlet.http.HttpServletRequest;
020
021
024 public class MapTag extends IncludeTag {
025
026 public void setGeolocation(boolean geolocation) {
027 _geolocation = geolocation;
028 }
029
030 public void setLatitude(double latitude) {
031 _latitude = latitude;
032 }
033
034 public void setLongitude(double longitude) {
035 _longitude = longitude;
036 }
037
038 public void setName(String name) {
039 _name = name;
040 }
041
042 public void setPoints(String points) {
043 _points = points;
044 }
045
046 public void setProvider(String provider) {
047 _provider = provider;
048 }
049
050 @Override
051 protected void cleanUp() {
052 _geolocation = false;
053 _latitude = 0;
054 _longitude = 0;
055 _name = null;
056 _points = null;
057 _provider = null;
058 }
059
060 @Override
061 protected String getPage() {
062 return _PAGE;
063 }
064
065 @Override
066 protected void setAttributes(HttpServletRequest request) {
067 request.setAttribute("liferay-ui:map:geolocation", _geolocation);
068 request.setAttribute("liferay-ui:map:latitude", _latitude);
069 request.setAttribute("liferay-ui:map:longitude", _longitude);
070 request.setAttribute("liferay-ui:map:name", _name);
071 request.setAttribute("liferay-ui:map:points", _points);
072 request.setAttribute("liferay-ui:map:provider", _provider);
073 }
074
075 private static final String _PAGE = "/html/taglib/ui/map/page.jsp";
076
077 private boolean _geolocation;
078 private double _latitude;
079 private double _longitude;
080 private String _name;
081 private String _points;
082 private String _provider;
083
084 }