Testing Your Shiny New Tile Server
You've built it! Now it's time to see it in action.
Start your Flask server by executing your Python script in your terminal:
python app.py
Your vector tile server is now running locally on port 5000. Let's test if the endpoint is successfully returning binary data. Open a new terminal window and use curl to fetch the 0/0/0 tile (the entire world):
curl -I http://localhost:5000/tiles/0/0/0.pbf
If everything went well, you should see an HTTP 200 OK response with the Content-Type: application/vnd.mapbox-vector-tile.
What's next? You can now plug this URL structure (http://localhost:5000/tiles/{z}/{x}/{y}.pbf) directly into modern frontend mapping libraries like MapLibre GL JS, Mapbox GL JS, or Leaflet (using the Leaflet.VectorGrid plugin) and watch your data render beautifully on the map!
Happy mapping from the GIS Career Hub team!