Automatic map positioning
If the map image has at least one placemark or geometric figure (polyline or polygon), the viewport can be automatically selected, even if the URL does not specify values for the map center (ll parameter), the viewport (spn parameter), or the zoom level (z parameter). The Static API selects values for the omitted parameters so that all placemarks, polylines and polygons are visible on the map.
If there is only one placemark set, it will be the center of the map; if a single polyline or polygon is set, the map center will be the geometric center of the area that is formed by the points of this polyline or polygon.
The following example requests a section of the map of Ankara showing a route from the metro station Çankaya to the building of Turkiye Tarim Kredi Kooperatifleri (the start and finish of the route are marked with placemarks). The request does not specify the ll, z or spn parameters:
If we add another placemark to the map, for example, at the Kadifekale metro station, a different map center and zoom level will be selected: