Generate a map centered on a city with a label
Optionaloptions: { height?: number; width?: number }Generate a static map with optional markers and shapes
const result = await staticMaps.generateMap({
cityName: 'girona',
countryCode: 'ESP',
width: 350,
height: 250,
});
const result = await staticMaps.generateMap({
width: 400,
height: 300,
extent: {
upperLeft: { lat: 41.439132726, lng: 2.003108336 },
lowerRight: { lat: 41.390497829, lng: 2.197135455 },
},
shapes: [
{
type: 'CIRCLE',
outlineColor: { r: 255, g: 0, b: 0, a: 128 },
outlineSize: 2,
fillColor: { r: 0, g: 255, b: 0, a: 128 },
center: { lat: 41.439132726, lng: 2.003108336 },
radius: 2000,
},
{
type: 'POLYLINE',
outlineColor: { r: 255, g: 0, b: 0 },
outlineSize: 2,
fillColor: { r: 255, g: 0, b: 0 },
coordinates: [
{ lat: 41.401902461, lng: 2.142455003 },
{ lat: 41.404628181, lng: 2.155965665 },
{ lat: 41.433339308, lng: 2.179860852 },
],
},
],
});
Generate map and return image data directly
Generate a map with a circle shape
Optionalstyle: { fillColor?: RGBAColor; outlineColor?: RGBAColor; outlineSize?: number }Optionaloptions: { height?: number; width?: number }Generate a map with a label at a specific position
Optionalstyle: { fillColor?: RGBAColor; outlineColor?: RGBAColor; outlineSize?: number }Optionaloptions: { height?: number; width?: number }Generate a map with a line between two points
Optionalstyle: { outlineColor?: RGBAColor; outlineSize?: number }Optionaloptions: { height?: number; width?: number }Generate a map with markers
Optionaloptions: { height?: number; width?: number }Generate a map with a polyline
Optionalstyle: { outlineColor?: RGBAColor; outlineSize?: number }Optionaloptions: { height?: number; width?: number }Generate a map with a rectangle shape
Optionalstyle: { fillColor?: RGBAColor; outlineColor?: RGBAColor; outlineSize?: number }Optionaloptions: { cityName?: string; height?: number; width?: number }Generate a map with a sector shape
Optionalstyle: { fillColor?: RGBAColor; outlineColor?: RGBAColor; outlineSize?: number }Optionaloptions: { height?: number; width?: number }ProtectedrequestExecutes a generic request to the Cercalia API.
Query parameters for the API request.
Human-readable name for logging and debugging.
OptionalbaseUrl: stringOptional override for the base API URL.
A promise resolving to the parsed API response.
StaticMapsService - Generate static map images with markers, shapes and labels
Based on the Cercalia Static Maps API: https://docs.cercalia.com/docs/cercalia-webservices/static-maps/
Features: