{"modulePath":"github.com/txn2/mcp-data-platform","version":"v1.172.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package maphttp\n\nPackage maphttp serves the basemap archives the maps settings keep (#2068) and the list of them, with no session.\n\nThe archives hold public OpenStreetMap data, and they are read by a map running in a sandboxed asset frame, whose origin is opaque, and from public share links, neither of which carries a session. corshttp answers these paths for the platform itself and the sites the maps settings allow (#2393). PMTiles is read only by byte range, so the archive route is the tile server: each map view reads the header, a directory or two, and the tiles it draws.\n\n## Constants\n\n```go\nconst PathPrefix = \"/portal/maps/\"\n```\nPathPrefix is where the routes live. It is under /portal/ so the tile worker answers it in-process, and is registered ahead of the portal UI's catch-all.\n\n## Functions\n\n```go\nfunc Mount(mux *http.ServeMux, svc Service)\n```\nMount registers the routes. A nil service mounts nothing, and the portal UI's catch-all answers the paths as it does any other.\n\n## Types\n\n```go\ntype Service interface {\n\tState(ctx context.Context) (maps.State, error)\n\tServedArchive(ctx context.Context, id string) (maps.Archive, maps.Objects, error)\n}\n```\nService is what the routes read. \\*maps.Service satisfies it.\n\n","path":"github.com/txn2/mcp-data-platform/internal/httpserver/maphttp","name":"maphttp","synopsis":"Package maphttp serves the basemap archives the maps settings keep (#2068) and the list of them, with no session.","isRedistributable":true}
