/** creates marker for tweet and its to map */ private void addTweet(Tweet t) { if (t.getText() == null) { // ignore tweets without text return; } GeoCoordinate gc = t.getUserCoordinate(); boolean addTweet = true; cleanOldest(); if (map.getZoomLevel() > 0) { GeoBoundingBox gbb = new GeoBoundingBox( map.pixelToGeo(new Point(0, 0)), map.pixelToGeo(new Point(map.getWidth(), map.getHeight()))); addTweet = gbb.contains(gc); } if (addTweet) { MapStandardMarker msm = mapFactory.createStandardMarker(gc, 100, "", MapStandardMarker.BALLOON); msm.setColor(MARKER_COLOR); map.addMapObject(msm); addedTweets.addData(msm, t); tweetAge.put(msm, new Long(t.getCreatedTime())); repaint(); } }