MCPcopy Create free account
hub / github.com/python-visualization/folium / test_xyzservices

Function test_xyzservices

tests/test_raster_layers.py:121–141  ·  view source on GitHub ↗
(tiles)

Source from the content-addressed store, hash-verified

119 "tiles", ["CartoDB DarkMatter", xyzservices.providers.CartoDB.DarkMatter]
120)
121def test_xyzservices(tiles):
122 m = folium.Map([48.0, 5.0], tiles=tiles, zoom_start=6)
123
124 folium.raster_layers.TileLayer(
125 tiles=xyzservices.providers.CartoDB.Positron,
126 ).add_to(m)
127 folium.LayerControl().add_to(m)
128
129 out = m._parent.render()
130 assert (
131 xyzservices.providers.CartoDB.DarkMatter.build_url(
132 fill_subdomain=False, scale_factor="{r}"
133 )
134 in out
135 )
136 assert (
137 xyzservices.providers.CartoDB.Positron.build_url(
138 fill_subdomain=False, scale_factor="{r}"
139 )
140 in out
141 )

Callers

nothing calls this directly

Calls 2

add_toMethod · 0.80
renderMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…