private PoiList createPoiList(ViaMichelinRoute route) {
ObjectFactory objectFactory = new ObjectFactory();
PoiList poiList = objectFactory.createPoiList();
poiList.setVersion("2.0");
Itinerary itinerary = objectFactory.createItinerary();
itinerary.setName(asRouteName(route.getName()));
poiList.getItineraryOrPoi().add(itinerary);
for (Wgs84Position position : route.getPositions()) {
Step step = objectFactory.createStep();
step.setLongitude(formatPositionAsString(position.getLongitude()));
step.setLatitude(formatPositionAsString(position.getLatitude()));
step.setName(position.getDescription());
itinerary.getStep().add(step);
}
return poiList;
}