Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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 types/mapbox__mapbox-sdk/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1882,7 +1882,7 @@ declare module "@mapbox/mapbox-sdk/services/static" {
}

interface SimpleMarker {
coordinates: LngLatLike;
coordinates: [number, number];
label?: string | undefined;
color?: string | undefined;
size?: "large" | "small" | undefined;
Expand Down
28 changes: 21 additions & 7 deletions types/mapbox__mapbox-sdk/mapbox__mapbox-sdk-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ const drivingDirectionsRequest: MapiRequest = directionsService.getDirections({
maxWidth: 10,
});

drivingDirectionsRequest.send().then((response: MapiResponse) => {
});
drivingDirectionsRequest.send().then((response: MapiResponse) => {});

const drivingTrafficDirectionsRequest: MapiRequest = directionsService.getDirections({
profile: "driving-traffic",
Expand All @@ -80,8 +79,7 @@ const drivingTrafficDirectionsRequest: MapiRequest = directionsService.getDirect
maxWidth: 10,
});

drivingTrafficDirectionsRequest.send().then((response: MapiResponse) => {
});
drivingTrafficDirectionsRequest.send().then((response: MapiResponse) => {});

const isochroneService: IsochroneService = Isochrone(client);

Expand Down Expand Up @@ -156,6 +154,22 @@ staticMapService.getStaticImage({
],
});

staticMapService.getStaticImage({
width: 16,
height: 16,
overlays: [
{
marker: {
// @ts-expect-error - Object literal may only specify known properties, and 'lng' does not exist in type '[number, number]'
coordinates: { lng: 0, lat: 0 },
},
},
],
position: "auto",
ownerId: "owner-id",
styleId: "some-style",
});

staticMapService.getStaticImage({
ownerId: "owner-id",
styleId: "some-style",
Expand Down Expand Up @@ -239,7 +253,7 @@ geocodeService
})
.send()
.then(({ body }) => {
body.features.forEach(feature => {
body.features.forEach((feature) => {
const shortCode = feature.short_code;
});
});
Expand All @@ -253,7 +267,7 @@ geocodeServiceV6
})
.send()
.then(({ body }) => {
body.features.forEach(feature => {
body.features.forEach((feature) => {
const shortCode = feature.properties.context.place?.short_code;
});
});
Expand All @@ -265,7 +279,7 @@ geocodeServiceV6
})
.send()
.then(({ body }) => {
body.features.forEach(feature => {
body.features.forEach((feature) => {
const shortCode = feature.properties.context.place?.short_code;
});
});
Expand Down