Community

How we built a street-level map of St. Kitts and Nevis in 107 MiB

2 December 2026·869 DOT DESIGN·36 views
How we built a street-level map of St. Kitts and Nevis in 107 MiB
Basseterre and the southeast peninsula of St. Kitts. Map data © OpenStreetMap contributors.

Running a directory for St. Kitts and Nevis means thinking about what happens after someone finds a listing. A visitor can find the airport on a map and still be unsure where to meet their driver. OpenStreetMap gives us the same starting point as developers around the world. Knowing these two islands helps us decide what to do with it.

Take Robert L. Bradshaw International Airport. Drop a pin in the centre of its mapped footprint and it lands west of the passenger terminal. The passenger needs a meeting place, and the driver needs a road that reaches it.

For a local booking service, we checked where the terminal driveway connects to the road and used that mapped point when a passenger searches for the airport by name. Passengers can still choose their own pickup pin. The map below uses that same street imagery. Its street coverage is limited to St. Kitts and Nevis. You can follow the coast from Basseterre or explore the streets of Charlestown. Zoom out and the view stays centred on the Federation.

Start at Port Zante in Basseterre. Zoom in to see the nearby streets, or zoom out and pan southeast across The Narrows to Charlestown on Nevis. Map data © OpenStreetMap contributors.

How we kept a two-island street map to 107 MiB

OpenStreetMap covers the world. We narrowed the job at the point of download. We requested a regional extract covering St. Kitts, Nevis and The Narrows. We used the same rectangle to decide which tiles to draw at each zoom level. Each step closer doubles the grid in both directions, so the same patch of land can take four times as many tiles at the next zoom level. Extending street-level coverage to neighbouring countries would mean importing more roads and buildings, drawing and storing more images, and maintaining a larger set at the next update. For someone choosing a pickup point in the Federation, that extra coverage buys nothing.

The render area measures roughly 45 km east to west and 41 km north to south, from 17.07° N, 62.92° W in the southwest to 17.44° N, 62.50° W in the northeast.

We started with a 46.88 MiB OpenStreetMap extract dated 27 October 2026. We used osm2pgsql to load the regional street data into PostgreSQL with PostGIS, then added separate water-polygon files for the coastline. Mapnik drew those layers together using the OpenStreetMap Carto style. It drew blocks of up to eight tiles by eight and cut them into 256-by-256-pixel PNG images. When someone pans the map, Nginx serves the finished images through Cloudflare.

The base map has 116,053 tiles across zoom levels 0 through 18. Zoom 18 alone accounts for 86,598 of them. Geography helps explain why they fit on disk: many squares of open sea produce exactly the same image. We used hard links so identical images share disk space even though each tile has its own address. Counting the base tiles and our local replacements, the serving directories occupy 107.03 MiB. That figure covers the files used to display the map. The source extract, build database and backups have their own storage costs.

A change you can see from the coast

On a map used to choose places and pickup points, maritime boundary lines drew attention away from the islands. We adjusted the display style to remove those lines while keeping land boundaries visible. Only 465 tile images needed replacements. The server serves a replacement wherever one exists and uses the original tile everywhere else.

That change belongs to our rendering style. The airport pickup point belongs to the booking application. The roads and coastlines come from OpenStreetMap contributors. Each can be updated independently, and a road edit appears on our map once we import a newer extract containing the edit, render the affected tiles and publish them.

Why we serve the tiles ourselves

OpenStreetMap gives us two things people often call “the map”. One is the geographic data that contributors maintain. The other is a public service that draws that data and sends ready-made tiles to browsers. We used the data to draw our own tiles. When a passenger opens the booking map, the phone asks our service for the images.

You can use the OpenStreetMap Foundation’s public tile service on a live website if you follow its policy. Donations and sponsorship fund the service. Availability is best-effort, with no service-level agreement. Its policy covers attribution, identifying the application or referring website, and how long to cache tiles. Bulk downloads and prefetching tiles for offline use are prohibited, and traffic that degrades the service can be blocked without notice. That matters if a customer is standing outside the terminal waiting to choose a pickup point. For that job, we wanted a service we could monitor and repair ourselves. A hosted service with a suitable support agreement is another way to meet that need. OpenStreetMap Foundation tile usage policy.

What happens when you pan back to Port Zante?

Every tile has an address made up of a zoom level, a column and a row. If you pan from the waterfront into Basseterre and then back again at the same zoom, the map needs some of the same images twice. On our production map, Nginx marks those PNGs as fresh for seven days. A browser that still has a fresh copy can draw it immediately without making another network request.

If the browser needs a tile, it asks Cloudflare. An edge cache with a fresh copy can return the image. On a miss, the request reaches Nginx, which reads the finished PNG from disk. The map database and renderer stay out of that request. When a cached image expires, the browser or edge can ask whether it has changed. An HTTP 304 response lets it reuse its copy without downloading the image again. We saw three such responses in the origin logs during the week measured below.

Long cache lifetimes also affect how quickly a correction reaches readers. When we changed the maritime styling, we gave the revised layer a new version in its tile URLs. A phone that still had the old boundary lines cached could fetch the revised tiles straight away. Before switching, we checked the replacement files against their checksum manifest and tested the map at desktop and phone widths.

What a reader actually downloads

A tile showing several streets and labels takes more bytes than a square of sea. At zoom 16, the tile containing central Basseterre was 28.0 kB. The tile containing central Charlestown was 20.5 kB. Here’s how those examples compare with what the service delivered.

Measurements from the map service
What we measuredWhat we saw
PNG size at the origin server8.61 kB on average across 715 successful image responses. The median was 6.32 kB.
Requests served from Cloudflare’s cacheAbout 32% of requests were outright cache hits. Cloudflare reported about 1,068 tile requests, including 345 hits, 720 misses and 3 revalidations.
Time to load an individual tileAbout 528 ms at the 95th percentile in a separate Chrome test of 48 tile loads, with the browser cache disabled.

The server and cache figures cover the week ending 2 December 2026 at 23:00 UTC. Cloudflare sampled some intervals. The browser test used one machine at phone and desktop screen widths, so it tells us how that run performed. A reader’s connection and a previously visited area can produce quite different results. A return visit served entirely by the browser never appears in Cloudflare’s hit count. We used the same distinction between requests and people when examining two million requests to a local directory.

Who pays when someone opens the map?

Our production costs come from storing and delivering the tiles, keeping backups and spending time on updates. Opening the map consumes bandwidth whenever images have to travel over the network. It uses no commercial map API key or per-view allowance. The traffic figures help us plan for busier days.

With a hosted map, the product you choose matters. Google’s Maps Embed API is free to use and requires an API key. Its Dynamic Maps product, commonly used for interactive applications, is metered by map load. At the standard pay-as-you-go rates listed on 2 December 2026, the first 10,000 monthly loads are free and the next tier is US$7 per 1,000. A site with 20,000 eligible Dynamic Maps loads in a month would therefore incur US$70 for those loads. That illustration assumes the full monthly allowance is available. Address searches and driving directions have their own pricing. Google Maps Platform pricing · Google Maps Embed API usage and billing.

A rate limit is a different consideration. Mapbox’s Static Tiles API, for example, lists a default limit of 6,000 tile requests per minute per access token. Above that rate it returns a “too many requests” response. A single map view can fetch several tiles, so our count of tile requests cannot be used as a count of billable Google map loads. Hosting the imagery ourselves lets us set capacity around the traffic our two-island map actually receives.

Does your business need its own map?

If someone is coming to dinner, what they need from the website is a way to find the front door. For a restaurant with one entrance, a clear address and a directions link will often do the job. That’s the kind of problem we explored in our Sprat Net local search case study. It’s also why we keep the scope of a small-business website straightforward with our fixed-package web design service at webdesign.kn.

At the airport, the meeting place can change with each booking. A passenger has to choose a point, and the driver needs to receive that same point with the job. That’s where the map becomes part of the service itself. Drawing the street is one piece. Passing the passenger’s choice into the booking is another, and it’s the kind of connection we describe in our guide to custom APIs.

Over 20 years in cybersecurity, web design and systems administration, we’ve learned to ask who will look after a service on a busy morning before we take it in-house. In this case, we knew the roads, maintained the servers and could check a change on the same kind of phone a passenger would use. That made a map of these two islands a sensible thing for us to run ourselves.

Tags

OpenStreetMapWeb mappingSt. Kitts and Nevis

Corrections

Did we get something wrong?

Tell us what is inaccurate and we will check it and correct the piece. Send a correction