Get Static Map

GET
https://api.woosmap.com/maps/static

Retrieve a static map

Ratelimit: 20/1s

Authorization

key
apiKey query

Public key of the project usually starts with woos-

private_key
apiKey query

Private key with or without write permission.

X-Api-Key
apiKey header

Private key with or without write permission.

Query Parameters

language
object
lat
number required
Example: 43.6
lng
number required
Example: 3.883
zoom
number required

The zoom

Example: 11
width
integer required

Width in pixels. width * height must not exceed 409,600.

Example: 400
height
integer required

Height in pixels. width * height must not exceed 409,600.

Example: 400
markers
array

Adds a marker.

The images are by default are considered to be non retina images (pixel resolution=1)

If the image name contains @2x or the query parameter retina=yes are found in the marker url the image will be considered to be retina (pixel resolution=2).

Note: the image size in bytes cannot exceed 65535 bytes.

Example: {"lat": 43.6, "lng": 3.883, "url": "https://webapp.woosmap.com/img/geolocated_marker.png?retina=yes"}

Add a polyline.

Note: enc should be a google encoded polyline see Google-encoded polyline for more information

Example: {"enc": "ydjiG_}jVjn@cjAf`AycBnc@mqCp\\ewBrQmlBzrAeuCreBw_C", "color": "magenta", "weight": 4}

Adds a polygon.

Note: shape should be a google encoded polyline see Google-encoded polyline for more information

Example: {"shape": "ymgiGm|rV~uAtaB|dAefCqeBwuFu~@njC??", "fill_color": "rgba(255, 20, 147, 0.5)", "color": "rgba(199, 21, 133, 0.7)"}
retina
boolean Defaults to false
stylers
string
Example: [{"featureType": "points_of_interest.business", "stylers":[{"visibility": "off"}]}]

Response

200 image/webp

Successful Response

No properties defined

Errors

401

Unable to locate credentials.

application/json
detail
string required
402

Out of free quota.

application/json
detail
string required
403

Credentials found, but not matching.

application/json
detail
string required
422

Validation Error

application/json
detail
object[]
Show 5 propertiesHide 5 properties
detail. loc
any[] required
detail. msg
string required
detail. type
string required
detail. input
any
detail. ctx
object
429

Rate limit reached

application/json
details
string required
        curl -L 'https://api.woosmap.com/maps/static?lat=48.8566&lng=2.3522&zoom=14&width=600&height=400&markers=48.8566%2C2.3522&language=en&key=YOUR_PUBLIC_API_KEY' \
-H 'Referer: http://localhost'

    
        const requestOptions = {
  method: "GET",
  redirect: "follow"
};

fetch("https://api.woosmap.com/maps/static?lat=48.8566&lng=2.3522&zoom=14&width=600&height=400&markers=48.8566%2C2.3522&language=en&key=YOUR_PUBLIC_API_KEY", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));

    
        import requests

url = "https://api.woosmap.com/maps/static?lat=48.8566&lng=2.3522&zoom=14&width=600&height=400&markers=48.8566%2C2.3522&language=en&key=YOUR_PUBLIC_API_KEY"

payload = {}
headers = {
    'Referer': 'http://localhost'
}

response = requests.request("GET", url, headers=headers, data=payload)

print(response.text)


    
Was this helpful?