City walking tour itinerary
Numbered stops placed on the map from latitude and longitude
- Template
- ODP
- Export as
- PDF, ODP, PPTX, PNG, SVG +29 more
- Carbone
- 5.18+
Generate trip itineraries from your travel platform
Tour operators, destination marketing organizations and travel platforms send each traveler a day plan: the route on a map, the stops in visiting order, opening hours, how long to stay and how far to walk. The trip lives in your booking or itinerary software; it sends the day to the Carbone API as JSON and gets back a PDF, or a PowerPoint file with "convertTo": "pptx", for every traveler and every day of the trip. In this example, Solvento Journeys, a fictional tour operator, builds Day 2 of a trip to Valmora, a fictional island town: an overview slide with the route and the stop list, then one slide per stop with its photo and its pin on the map.
In this example, you will:
- Place numbered pins on a map from the latitude and longitude of each stop
- Repeat one slide per stop, with a photo from your data
- Color each pin and each row by category
- Compute the walking distance and the length of the day from the stops
How to place GPS points on a map
Follow these steps to build the itinerary in LibreOffice Impress.
1. Calibrate the map
- The map must be your own image, here a 15 cm by 15.75 cm illustration. Note the GPS coordinates of one point of the map and its position on the slide: here 40.05 N, 5.40 E sits at X 7.535 cm, Y 7.875 cm.
- Measure the scale of each axis in centimeters per degree. Over a city, one degree of latitude covers about 111 km, and one degree of longitude 111 km multiplied by the cosine of the latitude. On this map, 1 cm is 112.8 m:
cm per degree of latitude = 15.75 / 0.016 = 984.4
cm per degree of longitude = 984.4 x cos(40.05°) = 753.5This flat projection keeps the error well under a millimeter over a few kilometers, the size of a city walk.
2. Move each pin from its coordinates
- Draw a circle for the pin, centered on the reference point, with
{d.stops[i].number}inside. - In its alternative text (Description in LibreOffice Impress), write the two tags below. They print nothing: they move the circle.
{d.stops[i].longitude:sub(5.40):mul(753.5):transform(x,cm)}
{d.stops[i].latitude:sub(40.05):mul(-984.4):transform(y,cm)}- :sub computes the distance in degrees from the reference point, :mul converts it into centimeters, and :transform moves the shape by that distance. The latitude coefficient is negative because the latitude grows towards the north, while Y grows towards the bottom of the slide.
- Add a small text box with
{d.stops[i+1].number}at the same place, in front of the circle (right-click > Arrange > Bring to Front). It ends the loop, and Carbone repeats the circle for each stop: the Harbour promenade (40.04952 N, 5.40652 E) moves 4.91 cm to the right and 0.05 cm down. - The stop slides repeat the trick on a smaller copy of the map, with coefficients scaled to its width:
mul(311.45)andmul(-406.89).
3. Color the pins by category
- The alternative text of the pin also holds
{d.stops[i].category:ifEQ(museum):show('#6B4FD8'):ifEQ(viewpoint):show('#1A7FD0'):ifEQ(food):show('#B87800'):elseShow('#D6336C'):color(shape, background)}. The chain of conditions picks the color of the category, and :color fills the shape. Give the shape a fill color in the template first. - In the stop list, the same chain ends with
:color(cell, background)and colors the number cell of each row.
4. List the stops and add up the day
- The table repeats its row with
{d.stops[i].name},{d.stops[i].arrival},{d.stops[i].hours}and{d.stops[i].visitMin} min. The last stop has no next walk:{d.stops[i].walkToNextMin:ifNEM:append(' min'):elseShow('Finish')}prints Finish, and{d.stops[i].walkToNextM:ifEM:drop(p)}removes the empty distance line (smart conditions). - The figures above the table come from the stops with aggregators:
{d.stops[].walkToNextM:aggSum:div(1000):formatN(1)} kmfor the distance, and{d.stops[].visitMin:aggSum:set(c.visit)}and{d.stops[].walkToNextMin:aggSum:set(c.walk)}to store the time at stops and the walking time.{c.visit:add(c.walk):div(60):floor} h {c.visit:add(c.walk):mod(60)}gives the length of the day: 5 h 32, from 09:30 to 15:02.
5. Repeat one slide per stop
- On the second slide, insert a temporary photo and write
{d.stops[i].photo}in its title (right-click > Description, field Title). Carbone replaces it with the image of each stop, here a Base64 data URI; a URL works too. - A third slide with a single text box,
{d.stops[i+1].name}, ends the loop: Carbone repeats the second slide for each stop and removes the third one.
Save the ODP template, send the day of each trip as JSON, and Carbone draws the route of every itinerary.
Related Examples
Trusted by 800+ paid customers in 40+ countries














