45 |
45 |
*
|
46 |
46 |
* $Id$
|
47 |
47 |
* $Log$
|
48 |
|
* Revision 1.10 2006-11-06 13:21:38 fjp
|
|
48 |
* Revision 1.11 2006-11-06 17:19:02 fjp
|
|
49 |
* Depurando el aspecto
|
|
50 |
*
|
|
51 |
* Revision 1.10 2006/11/06 13:21:38 fjp
|
49 |
52 |
* detalles
|
50 |
53 |
*
|
51 |
54 |
* Revision 1.9 2006/10/27 10:17:27 fjp
|
... | ... | |
233 |
236 |
htmlText += "<style type='text/css'>";
|
234 |
237 |
htmlText += "<!-- ";
|
235 |
238 |
htmlText += " .normal { ";
|
236 |
|
htmlText += " font-family: Arial, Helvetica, sans-serif; font-size: 10px; font-style: normal; color: #0000FF;";
|
237 |
|
htmlText += "} --> ";
|
|
239 |
htmlText += " font-family: Arial, Helvetica, sans-serif; font-size: 10px; font-style: normal; color: #333333;";
|
|
240 |
htmlText += "}";
|
|
241 |
htmlText += " a { ";
|
|
242 |
htmlText += " font-family: Arial, Helvetica, sans-serif; font-size: 10px; font-style: italic; font-weight: bold;";
|
|
243 |
htmlText += "}";
|
|
244 |
htmlText += " h1 { ";
|
|
245 |
htmlText += " font-family: Arial, Helvetica, sans-serif; font-size: 14px;";
|
|
246 |
htmlText += "}";
|
|
247 |
htmlText += " .distancia { ";
|
|
248 |
htmlText += " font-family: Arial, Helvetica, sans-serif; font-size: 10px; color: #666666;";
|
|
249 |
htmlText += "}";
|
|
250 |
htmlText += " .resumen { ";
|
|
251 |
htmlText += " font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #333333;";
|
|
252 |
htmlText += "}";
|
|
253 |
htmlText += " .left { ";
|
|
254 |
htmlText += " font-weight: bold; color: #990000;";
|
|
255 |
htmlText += "}";
|
|
256 |
htmlText += " .right { ";
|
|
257 |
htmlText += " font-weight: bold; color: #0033FF;";
|
|
258 |
htmlText += "}";
|
|
259 |
|
|
260 |
htmlText += " -->";
|
238 |
261 |
htmlText += "</style>";
|
239 |
262 |
htmlText += "</head>";
|
240 |
263 |
htmlText += "<body>";
|
... | ... | |
274 |
297 |
htmlText += "<h1>";
|
275 |
298 |
htmlText += "Informe de Ruta:" + startName + "-" + stopName ;//TODO INTERNACIONALIZAR ESTO
|
276 |
299 |
htmlText += "</h1><br>";
|
277 |
|
htmlText += "Salida desde: <b>";//TODO INTERNAC
|
|
300 |
htmlText += "<span class='resumen'>Salida desde: <b>";//TODO INTERNAC
|
278 |
301 |
htmlText += startName;
|
279 |
302 |
htmlText += "</b><br>";
|
280 |
303 |
htmlText += "Llegada a:<b> ";//TODO INTERNAC
|
281 |
304 |
htmlText += stopName + "</b><br>";
|
282 |
305 |
|
283 |
306 |
//TODO METER LA LONGITUD TOTAL DEL TRAYECTO AQUI
|
284 |
|
htmlText += "Longitud total del trayecto: <b>" + nf.format(getLengthOfRoute()) + "</b>";
|
|
307 |
htmlText += "Longitud total del trayecto: <b>" + nf.format(getLengthOfRoute()) + "</b></span>";
|
285 |
308 |
htmlText += LINE_SEPARATOR;
|
286 |
309 |
}
|
287 |
310 |
|
... | ... | |
299 |
322 |
private void renderFirstStrech(IFeature feature){
|
300 |
323 |
htmlText += "<table>";
|
301 |
324 |
htmlText += "<tr>";
|
302 |
|
htmlText += "<td>";
|
|
325 |
htmlText += "<td width='40'>";
|
303 |
326 |
htmlText += START_IMAGE;
|
304 |
327 |
htmlText += "</td>";
|
305 |
328 |
htmlText += "<td class='normal'>";
|
306 |
329 |
htmlText += "1. Salir de:<b> ";//TODO INTERNAC
|
307 |
330 |
htmlText += feature.getAttribute(Route.TEXT_INDEX);
|
308 |
331 |
htmlText += "</b></td></tr>";
|
309 |
|
htmlText += "<tr><td class='normal'><a href=\""+0+"\">Ver sobre el mapa</a><td></tr>";
|
|
332 |
htmlText += "<tr>";
|
|
333 |
htmlText += "<td width='40'></td><td><a href=\""+0+"\">Ver sobre el mapa</a><td></tr>";
|
310 |
334 |
htmlText += "</table>";
|
311 |
335 |
htmlText += LINE_SEPARATOR;
|
312 |
336 |
|
... | ... | |
342 |
366 |
imageTurn = STRAIGHT_IMAGE;
|
343 |
367 |
|
344 |
368 |
}else if(direction == TurnUtil.TURN_LEFT){
|
345 |
|
textoTramo = prefix += " gire a la <b>izquierda</b> por <b>" + street2 + "</b>";
|
|
369 |
textoTramo = prefix += " gire a la <span class='left'><b>izquierda</b></span> por <b>" + street2 + "</b>";
|
346 |
370 |
imageTurn = LEFT_IMAGE;
|
347 |
371 |
|
348 |
372 |
}else if(direction == TurnUtil.TURN_RIGHT){
|
349 |
|
textoTramo = prefix += " gire a la <b>derecha</b> por <b>" + street2 + "</b>";
|
|
373 |
textoTramo = prefix += " gire a la <span class='right'><b>derecha</b></span> por <b>" + street2 + "</b>";
|
350 |
374 |
imageTurn = RIGHT_IMAGE;
|
351 |
375 |
}
|
352 |
376 |
htmlText += "<table>";
|
353 |
377 |
htmlText += "<tr>";
|
354 |
|
htmlText += "<td>";
|
|
378 |
htmlText += "<td width='40'>";
|
355 |
379 |
htmlText += imageTurn;
|
356 |
380 |
htmlText += "</td>";
|
357 |
381 |
htmlText += "<td class='normal'>";
|
358 |
382 |
htmlText += numberOfStreets+" "+textoTramo;//TODO INTERNAC
|
359 |
383 |
htmlText += "</td></tr>";
|
360 |
|
htmlText += "<tr><td>Distancia acumulada:</td><td>"+nf.format(totalLenght)+"</td></tr>";
|
|
384 |
htmlText += "<tr>";
|
|
385 |
htmlText += "<td with='40'></td><td class='distancia'>Distancia acumulada:"+nf.format(totalLenght)+"</td></tr>";
|
361 |
386 |
|
362 |
387 |
if(!weightText.equalsIgnoreCase("Longitud:"))
|
363 |
|
htmlText += "<tr><td>Coste:</td><td>"+nf.format(totalWeight)+"</td></tr>";
|
|
388 |
{
|
|
389 |
htmlText += "<tr>";
|
|
390 |
htmlText += "<td with='40'></td><td class='distancia'>Coste:"+nf.format(totalWeight)+"</td></tr>";
|
|
391 |
}
|
364 |
392 |
|
365 |
393 |
String features = "";
|
366 |
394 |
for(int i = 0; i < tramesOfSameStreet.size() -1; i++){
|
... | ... | |
370 |
398 |
|
371 |
399 |
features += ((Integer)tramesOfSameStreet.get(tramesOfSameStreet.size()-1)).intValue();
|
372 |
400 |
System.out.println("features = " + features);
|
373 |
|
htmlText += "<tr><td><a href=\""+features+"\">Ver sobre el mapa</a><td></tr>";
|
|
401 |
htmlText += "<tr><td with='40'></td><td><a href=\""+features+"\">Ver sobre el mapa</a><td></tr>";
|
374 |
402 |
htmlText += "</table>";
|
375 |
403 |
htmlText += LINE_SEPARATOR;
|
376 |
404 |
|
... | ... | |
403 |
431 |
|
404 |
432 |
htmlText += "<table>";
|
405 |
433 |
htmlText += "<tr>";
|
406 |
|
htmlText += "<td>";
|
|
434 |
htmlText += "<td width='40'>";
|
407 |
435 |
htmlText += STOP_IMAGE;
|
408 |
436 |
htmlText += "</td>";
|
409 |
437 |
htmlText += "<td>";
|
410 |
438 |
htmlText += numberOfStreets+". Llegada: ";//TODO INTERNAC
|
411 |
439 |
htmlText += feature.getAttribute(Route.TEXT_INDEX);
|
412 |
440 |
htmlText += "</td></tr>";
|
413 |
|
htmlText += "<tr><td>Longitud:</td><td>"+nf.format(totalLenght)+"</td></tr>";
|
|
441 |
htmlText += "<tr><td with='40'></td><td>Longitud:"+nf.format(totalLenght)+"</td></tr>";
|
414 |
442 |
|
415 |
443 |
if(!weightText.equalsIgnoreCase("Longitud:"))
|
416 |
|
htmlText += "<tr><td>Coste:</td><td>"+totalWeight+"</td></tr>";
|
417 |
|
htmlText += "<tr><td><a href=\""+(route.getFeatureList().size()-1)+"\">Ver sobre el mapa</a><td></tr>";
|
|
444 |
htmlText += "<tr><td with='40'></td><td class='distancia'>Coste:"+totalWeight+"</td></tr>";
|
|
445 |
htmlText += "<tr><td with='40'></td><td><a href=\""+(route.getFeatureList().size()-1)+"\">Ver sobre el mapa</a><td></tr>";
|
418 |
446 |
htmlText += "</table>";
|
419 |
447 |
}
|
420 |
448 |
|