Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
mapbox-tileset
Advanced tools
Operate the tilesets API to upload and generate tilesets for your Mapbox maps.
The tilesets API works with two basic entities: the tileset-source
and the tileset
. To generate a tile layer for a map, you need to upload one or more files to a tileset-source
and then create a "recipe" that specifies which sources at which zoom levels should appear in a generated tileset
.
Mapbox requires an access token with permissions to create, list, delete, etc. the entities that comprise a tileset. Create an account and create an access token with the needed permissions. Pass the username and token to this tool by creating a .env
file with these two values:
MAPBOX_USERNAME=abc
MAPBOX_TOKEN=xyz
Alternatively, send the username as a CLI param -u <username>
and the token as -t <access_token>
.
mapbox-tileset source validate <geometry-file>
This checks that
mapbox-tileset source create <source-id> <geometry-file>
mapbox-tileset source create <source-id> <geometry-file-2>
To generate a tileset
from a tileset-source
, use a recipe
to specify which sources will be available at which zoom levels. The recipe for the tileset
takes this form:
{
"name": "My Tileset's Name",
"recipe": {
"version": 1,
"layers": {
"layer_id": {
"source": "mapbox://tileset-source/my-username/my-tileset-source",
"minzoom": 5,
"maxzoom": 8
}
}
}
}
With an available tileset-source
and a recipe.json
file like the above example,
mapbox-tileset tileset create <tileset-id> <recipe.json file>
Finally, to generate the tileset that will be usable in a Mapbox map,
mapbox-tileset tileset publish <tileset-id>
This step generates a job that can take quite a while to complete, depending on the number of zoom levels required and how much geographical area is included in the geometry sources.
mapbox-tileset tileset status <tileset-id>
mapbox-tileset source list
mapbox-tileset source delete <source-id>
mapbox-tileset tileset list
mapbox-tileset tileset recipe <tileset-id>
mapbox-tileset tileset delete <tileset-id>
FAQs
Interact with the Mapbox Tileset API
The npm package mapbox-tileset receives a total of 13 weekly downloads. As such, mapbox-tileset popularity was classified as not popular.
We found that mapbox-tileset demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.