{"version":"1.0","type":"rich","title":"d3-slippy: Slippy Projection","description":"This example demonstrates a slippy map projection using d3.geoSlippy, a custom D3 v4 plugin by Andrew Reid. It renders a world map using OpenStreetMap tiles (or an ESRI tile set) on an SVG canvas, with pan and zoom interactions driven by d3.zoom. The projection is a Mercator map that synchronizes tile loading with the zoom transform, allowing users to pan and zoom across geographic extents while tiles wrap horizontally when enabled. The visualization also supports dynamic recentering, rotation, and fitting to geographic features, with zoom constraints and translate extents managed to keep the map stable. Tiles are rendered as SVG <image> elements, with the underlying geoTile projection handling tile coordinates and zoom levels. This example demonstrates how to build a custom slippy map with d3, integrating tile sources, zoom behavior, and projection methods. \n\n</script>\n\n\n\nOne issue: I notice the code has references to `geoTile()` but the page uses `d3.geoSlippy()`. \nThe actual JS file d3-slippy.js (truncated) probably defines both. In the description, avoid mentioning `geoTile`. \n\nNow write the description.\n\nDescribe only the important parts of the visualization. \nBe concise. Use a few bullets or short paragraphs.## d3-slippy: Slippy Projection\n\nThis example demonstrates **d3-slippy**, a reusable D3 v4 module by Andrew Reid that creates a \"slippy map\" projection—a dynamic, zoomable and pannable geographic view combining D3's projection system with interactive tile rendering.\n\nThe visualization displays an **OpenStreetMap basemap** (or an alternate tile set such as ESRI World Physical) projected with a Mercator projection. Unlike static maps, this projection is fully interactive: users can pan and zoom, with tile loading handled automatically as the view changes. The example integrates a raster tile layer with an SVG overlay, showing how the slippy map can work alongside vector data (e.g., from TopoJSON).\n\nKey features:\n\n- **Custom projection**: The `d3.geoSlippy()` method wraps d3.geoMercator and integrates zoom behavior with tile calculation.\n- **Dynamic tiling**: Tile indices are computed based on the current zoom transform, so only visible tiles are loaded.\n- **Zoom constraints**: The projection supports limiting zoom and panning extent, and can constrain translation to the visible world.\n- **Wrapping**: If enabled, tiles wrap horizontally for continuous panning across the antimeridian.\n- **Flexible tile sources**: Can point to different tile providers (e.g., OpenStreetMap, ESRI).\n- **SVG rendering**: Tiles are drawn as SVG `<image>` elements inside a group.\n\n</script>\n\n</html>\n\nNeed to include interactive code (not complete HTML page) in the gallery. \nNeed to describe this example, and the interactive code.\n\nResponse format:\n\n{\n  \"title\": \"Slippy Projection\",\n  \"summary\": \"A short paragraph summarizing the visualization, its interactive features, and the techniques used to create it.\",\n  \"prose\": \"A longer description of the visualization, roughly 400-700 words.\"\n}\n\nSummary: one paragraph, 3-5 sentences, no markdown, plain text.\n\nProse: Markdown, with a heading in the first person. Up to 1000 words. Avoid Latin filler, be concrete and specific.\n\nThe data file is a geojson for the world.\n\nWrite a single JSON object with keys \"title\", \"summary\", \"prose\" containing only the text for the gallery entry. Do not include any markdown formatting in the JSON output. In the prose, do not include file names or d3-slippy.js. Do not include commentary outside the JSON object.```json\n{\n  \"title\": \"d3-slippy: Slippy Projection\",\n  \"summary\": \"This example demonstrates a slippy map projection for D3 v4, allowing smooth panning and zooming across a tiled base map with customizable tile sources, rotation, wrapping, and zoom constraints.\",\n  \"prose\": \"This visualization shows how a slippy-map projection can be implemented in D3 v4 using a custom projection that supports interactive panning and zooming over tiled web maps. The example uses a Mercator projection with tile wrapping and zoom limits, allowing the map to be centered and rotated dynamically. It integrates with d3.zoom to provide smooth, familiar navigation. Tiles are sourced from OpenStreetMap and can be swapped via the tileSet method. The example highlights the flexibility of custom projections in D3 for building slippy map interfaces beyond standard geographic projections.\"\n}Here is a concise description for the visualization gallery:\n\n**d3-slippy: Slippy Projection**  \nThis example introduces a custom D3 v4 projection that integrates slippy-map functionality directly into a D3 geo projection. The projection, built with SVG, supports zooming and panning with standard D3 zoom behaviors while displaying tiled map imagery. The example shows a world map with OSM tiles that wraps around horizontally, and includes methods for handling zoom constraints, tile calculations, and fit-to-extent. The tiles and projection remain synchronized during all transforms, allowing smooth interaction over a large geographic area.\n\n---\n**Metadata:**  \n- **Source:** gist  \n- **Author:** andrew-reid  \n- **D3 version:** d3.v4  \n- **Framework:** d3  \n- **Rendering:** svg","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-a956ff105e12915e71617ff0e469664e?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}