xyzservices provides a comprehensive collection of XYZ tile providers for mapping applications, offering easy access to various base maps and overlays. It helps users integrate tile services into geospatial libraries like Folium, Leaflet, and Contextily. The current version is 2026.3.0, and it maintains a rapid release cadence, typically monthly or bi-monthly, to reflect changes in upstream tile providers.
pip install xyzservicesVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to import the providers, access a specific tile provider (CartoDB Positron), and retrieve its basic properties like URL and attribution. Some providers may require an API key, which can be formatted into the URL template.
Migrate to `Stadia.Stamen*` variants, e.g., `xyz.Stadia.StamenToner` instead of `xyz.Stamen.Toner`.
Update `HEREv2` usage to `xyz.HERE` and ensure you are using the v3 API schema. Refer to HERE documentation for specific parameter changes.
Regularly check the `xyzservices` documentation or GitHub releases for updates on provider status. Consider using more stable, well-maintained providers for production applications. The `is_broken` attribute can be checked on providers.
Ensure you have obtained a valid API key for the respective service. Pass the key using the `.format(apiKey=YOUR_KEY)` method on the provider object before use.
pip install xyzservices
Verify the correct provider name by consulting `xyzservices.providers` documentation or listing available keys, e.g., `print(xyzservices.providers.keys())` or `xyzservices.providers.OpenStreetMap.Mapnik`.
Use the correct attribute for the URL template, which is `provider.url`.
Provide a valid provider string from `xyzservices.providers` (e.g., `'OpenStreetMap.Mapnik'`) or an `xyzservices.TileProvider` object to the `source` argument in `contextily.add_basemap()`.
No dependency data recorded yet.