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 shows a request for a map fragment of Ankara with a route from the Çankaya metro station to the Turkiye Tarim Kredi Kooperatifleri building (the start and end of the route are marked). The request does not specify the
If we add another placemark to the map, for example, near the Kadifekale metro station, a different map center and zoom level will be selected: