-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support serving static maps #435
Conversation
7f10e2b
to
3df04bd
Compare
3df04bd
to
1b66f4c
Compare
// TODO: If necessary, need to flip the y value first if the TileJSON source is TMS scheme | ||
// Doing this will depend on if we decide that the asar directory structure should only follow XYZ or if it should align with corresponding tilejson spec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
highlighting this. are we able to assume that the tile urls use z/x/y format and the directories that are stored on the filesystem follow that convention? basically, how much control do we usually have over the style.json files that are used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not my most helpful comment, but want to explicitly say: I don't know. My hunch is that we should get an answer to this before the MVP, but not before merging this.
7653a19
to
c5707ff
Compare
1b66f4c
to
5ec177c
Compare
c5707ff
to
7f5cab7
Compare
b391b3d
to
24361ec
Compare
24361ec
to
bcaea2b
Compare
tests/fastify-plugins/maps.js
Outdated
// TODO: Currently fails | ||
// Requires fixture setup that has default/ in static directory, online proxy, then offline fallback map | ||
skip('/style.json resolves with expected style.json', async (t) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will enable this test when working on #439
7412da8
to
e563dce
Compare
e563dce
to
b4d8819
Compare
b4d8819
to
3e7668c
Compare
Had the following thought while I was reviewing: you've split this into multiple Fastify plugins. Why not just have one big plugin? I worry this is a premature abstraction...are there ever cases where you wouldn't include all the plugins? |
could categorize as premature but useful (also easier to build iteratively since they're all rather distinct functionalities). the idea was to build this in a way that could potentially be split off into its own package that contais all of these plugins. to summarize the purpose of each plugin:
if we ever fully move away from the static directory approach of serving maps, then it'll be easier to remove that piece with the plugin approach implemented here. so in theory, yes - the static-maps plugin could potentially cease to exist if we ever reach that point 😄 |
773a3d6
to
771f7df
Compare
Closes #437
Towards #439
Stacked on #440Combines changes extracted from digidem/mapeo-map-server#101 and digidem/comapeo-mobile#155
Notes: