/** * Class for GMap Marker usage in MDSAT. *

* @author pascal.perau */ public class BoothGmapMarker extends Marker { private static final Logger LOG = LoggerFactory.getLogger(BoothGmapMarker.class); @Getter @Setter private Booth booth; private final String MARKER_PREFIX = "http://thydzik.com/thydzikGoogleMap/markerlink.php?text="; private final String MARKER_URL = "http://chart.googleapis.com/chart?chst=d_map_pin_letter&chld="; public BoothGmapMarker(LatLng latlng, String title, Booth booth) { super(latlng, title, booth); this.booth = booth; } public void setMarkerColor(Color c) { String hexColor = String.format("%06x", c.getRGB() & 0xffffff); String inversColor = String.format("%06x", (~c.getRGB()) & 0xffffff); this.setIcon(MARKER_URL + booth.getBoothId() + "|" + hexColor + "|" + inversColor + "&.png"); } @Override public String toString() { return "BoothGmapMarker{" + "boothId=" + booth.getBoothId() + ", MARKER_PREFIX=" + MARKER_PREFIX + ", MARKER_URL=" + MARKER_URL + '}'; } }