Mapbox Map Provider
Mapbox offers global satellite imagery and customizable maps for geospatial AI tasks.
Setup
🔑
Get your Mapbox access token at mapbox.com
import { geoai } from "@geobase-js/geoai";
// Configuration
const mapboxParams = {
provider: "mapbox",
apiKey: process.env.MAPBOX_ACCESS_TOKEN,
style: "mapbox://styles/mapbox/satellite-v9",
};
// Initialize pipeline with Mapbox
const pipeline = await geoai.pipeline(
[{ task: "object-detection" }],
mapboxParams
);
// Run inference on polygon
const results = await pipeline.inference({
inputs: { polygon: myPolygon },
mapSourceParams: { zoomLevel: 18 },
});
Parameters
type MapboxParams = {
provider: "mapbox";
apiKey: string; // Your Mapbox access token
style: string; // Mapbox style URL or ID
};
🛰️
Only satellite styles are supported for AI tasks.