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

replaceTilesetSource method #404

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

replaceTilesetSource method #404

wants to merge 2 commits into from

Conversation

mapsam
Copy link
Contributor

@mapsam mapsam commented Nov 18, 2020

This adds the Tilesets.replaceTilesetSource method to the Tilesets service. https://docs.mapbox.com/api/maps/#replace-a-tileset-source

I'm reading through the development requirements, and think I need to verify a few things:

Also massive h/t to @andrewharvey for adding the Tilesets service to the SDK originally. So good!

cc @katydecorah @andrewharvey

closes #432

Copy link
Collaborator

@andrewharvey andrewharvey left a comment

Choose a reason for hiding this comment

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

This is great thanks, looks like just needs a rebase against main to rebuild the docs.

@agrantham
Copy link

Hey there!

Any chance this could get merged and a new version deployed? I could really use this in a current project. If any help is needed to get this merged I would be happy to help out.

Thanks!

@jboolean
Copy link

jboolean commented Mar 5, 2023

This would be a valuable addition for me. Can we get this in?

@andrewharvey andrewharvey force-pushed the tilesets-replace-source branch from 9283b82 to 80bef3b Compare March 30, 2023 04:29
@andrewharvey andrewharvey force-pushed the tilesets-replace-source branch from 80bef3b to 2d05657 Compare March 30, 2023 04:30
@andrewharvey
Copy link
Collaborator

rebased against main with rebuilt docs

@andrewharvey
Copy link
Collaborator

https://github.com/mapbox/mapbox-sdk-js/blob/main/docs/development.md#service-method-naming-conventions suggests PUT methods should be named put*, so should I rename this to Tilesets.putTilesetSource? Happy to change it!

I think best to leave it as replaceTilesetSource to be consistent with the API, despite going against the service naming conventions.

I considered adding a replace: true option to Tilesets.createTilesetSource method instead of an entirely new method. This would effectively change POST to PUT, but I wasn't able to find any instances of this pattern in the rest of the SDK. Thoughts on this idea?

Definitely a separate method sounds best to me, as it mirrors the main API and the method name is immediately clear on what it does.

@luskin
Copy link

luskin commented Dec 29, 2023

Can we please get this merged in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add replaceTilesetSource
5 participants