Skip to content

Add a "no tiles" option #330

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 15, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions folium/map.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ def __init__(self, location=None, width='100%', height='100%',
height: pixel int or percentage string (default: '100%')
Height of the map.
tiles: str, default 'OpenStreetMap'
Map tileset to use. Can use defaults or pass a custom URL.
Map tileset to use. Can choose from a list of built-in tiles,
pass a custom URL or pass `None` to create a map without tiles.
API_key: str, default None
API key for Cloudmade or Mapbox tiles.
max_zoom: int, default 18
Expand Down Expand Up @@ -122,9 +123,10 @@ def __init__(self, location=None, width='100%', height='100%',

self.crs = crs

self.add_tile_layer(tiles=tiles, min_zoom=min_zoom, max_zoom=max_zoom,
attr=attr, API_key=API_key,
detect_retina=detect_retina)
if tiles:
self.add_tile_layer(tiles=tiles, min_zoom=min_zoom, max_zoom=max_zoom,
attr=attr, API_key=API_key,
detect_retina=detect_retina)

self._template = Template(u"""
{% macro header(this, kwargs) %}
Expand Down