Skip to content
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(cli): Update a preview url for zoom level changes. #2699

Merged
merged 5 commits into from
Feb 21, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/cli/src/cli/config/action.import.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export class CommandImport extends CommandLineAction {
let msg = ' - Zoom level updated.';
if (layer.minZoom !== existing.minZoom) msg += ` min zoom ${existing.minZoom} -> ${layer.minZoom}`;
if (layer.maxZoom !== existing.maxZoom) msg += ` max zoom ${existing.maxZoom} -> ${layer.maxZoom}`;
change.push(`${msg}\n`);
change.push(`${msg} -- [Aerial]((${PublicUrlBase}?config=${this.config.value}&debug))\n`);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this url should be added to the next if statements? we are going to need both NZTM and Webmercator links?

What happens if the zoom changes and the layer id changes? going to get a bunch of links?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, we shouldn't end up with too many links. I have update this only have a default aerial preview link if only zoom level change and layer id not change.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I add the links for both available projections now.

image

}
if (layer[2193] && layer[2193] !== existing[2193]) {
const urls = await this.prepareUrl(layer[2193], mem, Nztm2000QuadTms);
Expand Down