26 |
import javax.servlet.http.HttpServletRequest; |
import javax.servlet.http.HttpServletRequest; |
27 |
import javax.servlet.http.HttpServletResponse; |
import javax.servlet.http.HttpServletResponse; |
28 |
|
|
29 |
import dk.thoerup.traininfoservice.banedk.TimeoutMap; |
import dk.thoerup.genericjavautils.TimeoutMap; |
30 |
|
|
31 |
@WebServlet(urlPatterns={"/RequestPlotter"}) |
@WebServlet(urlPatterns={"/RequestPlotter"}) |
32 |
public class RequestPlotter extends HttpServlet { |
public class RequestPlotter extends HttpServlet { |
267 |
for(RequestPosition current : list) { |
for(RequestPosition current : list) { |
268 |
String id = color + count++; |
String id = color + count++; |
269 |
sb.append( " <Placemark id=\"" + id + "\">\n" ); |
sb.append( " <Placemark id=\"" + id + "\">\n" ); |
270 |
|
sb.append( " <name>").append(current.time).append("</name>\n" ); |
271 |
sb.append( " <styleUrl>#").append(color).append("</styleUrl>\n" ); |
sb.append( " <styleUrl>#").append(color).append("</styleUrl>\n" ); |
272 |
sb.append( " <description><![CDATA[IP=").append(current.ip).append("<br/>Time=").append(current.time).append("]]></description>\n" ); |
sb.append( " <description><![CDATA[IP=").append(current.ip).append("<br/>Time=").append(current.time).append("]]></description>\n" ); |
273 |
sb.append( " <Point><coordinates>").append(current.lng).append(",").append(current.lat).append(",0</coordinates></Point>\n" ); |
sb.append( " <Point><coordinates>").append(current.lng).append(",").append(current.lat).append(",0</coordinates></Point>\n" ); |
386 |
|
|
387 |
if (count > 30) //limit to 30 days |
if (count > 30) //limit to 30 days |
388 |
count = 30; |
count = 30; |
389 |
|
if (count < 0) //negative count is not allowed |
390 |
|
count = 0; |
391 |
|
|
392 |
String kmlData = getRequestsFromFile(count); |
String kmlData = getRequestsFromFile(count); |
393 |
|
|