Skip to content

Commit 60c0016

Browse files
committed
Add options parameter to LocateControl plugin
1 parent b4305bd commit 60c0016

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1765
-1550
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ geckodriver.log
1717
geckodriver.tar.gz
1818
geckodriver/
1919
miniconda.sh
20+
venv

.stickler.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ linters:
22
flake8:
33
max-line-length: 120
44
max-complexity: 10
5+
python: 3
56
files:
67
ignore: ['*.ipynb', 'conf.py']

docs/installing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Requirements
55
------------
66
::
77

8-
branca, jinja2, requests, and six.
8+
branca, jinja2 and requests.
99

1010
Some functionalities may require extra dependencies
1111
`numpy`, `pandas`, `geopandas`, `altair`, etc.

examples/Plugins.ipynb

Lines changed: 7 additions & 7 deletions
Large diffs are not rendered by default.

examples/index.html

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<!DOCTYPE html>
2+
<head>
3+
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
4+
5+
<script>
6+
L_PREFER_CANVAS = false;
7+
L_NO_TOUCH = false;
8+
L_DISABLE_3D = false;
9+
</script>
10+
11+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/leaflet.js"></script>
12+
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
13+
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
14+
<script src="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.js"></script>
15+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/leaflet.css"/>
16+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"/>
17+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css"/>
18+
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.3/css/font-awesome.min.css"/>
19+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/Leaflet.awesome-markers/2.0.2/leaflet.awesome-markers.css"/>
20+
<link rel="stylesheet" href="https://rawcdn.githack.com/python-visualization/folium/master/folium/templates/leaflet.awesome.rotate.css"/>
21+
<style>html, body {width: 100%;height: 100%;margin: 0;padding: 0;}</style>
22+
<style>#map {position:absolute;top:0;bottom:0;right:0;left:0;}</style>
23+
24+
<meta name="viewport" content="width=device-width,
25+
initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
26+
<style>
27+
#map_d19ea42a01d7424e899dfb6eb4ab0d7b {
28+
position: relative;
29+
width: 100.0%;
30+
height: 100.0%;
31+
left: 0.0%;
32+
top: 0.0%;
33+
}
34+
</style>
35+
36+
</head>
37+
<body>
38+
39+
<div class="folium-map" id="map_d19ea42a01d7424e899dfb6eb4ab0d7b" ></div>
40+
41+
</body>
42+
<script>
43+
44+
var bounds = null;
45+
46+
var map_d19ea42a01d7424e899dfb6eb4ab0d7b = L.map(
47+
"map_d19ea42a01d7424e899dfb6eb4ab0d7b",
48+
{
49+
center: [45.5236, -122.675],
50+
zoom: 10,
51+
maxBounds: bounds,
52+
layers: [],
53+
worldCopyJump: false,
54+
crs: L.CRS.EPSG3857,
55+
zoomControl: true,
56+
}
57+
);
58+
59+
60+
61+
62+
63+
var tile_layer_872f9c8b47294f9095ed47e2fbacdd62 = L.tileLayer(
64+
"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
65+
{"detectRetina": false, "maxNativeZoom": 18, "maxZoom": 18, "minZoom": 0, "noWrap": false, "opacity": 1, "subdomains": "abc", "tms": false}
66+
).addTo(map_d19ea42a01d7424e899dfb6eb4ab0d7b);
67+
68+
</script>

folium/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# -*- coding: utf-8 -*-
22

3-
from __future__ import (absolute_import, division, print_function)
4-
53
import sys
6-
import warnings
74

85
import branca
96
from branca.colormap import (ColorMap, LinearColormap, StepColormap)
@@ -70,7 +67,7 @@
7067
7168
- Install an older version of folium:
7269
73-
$ pip install 'folium<9.0'
70+
$ pip install 'folium<0.9.0'
7471
7572
""".format(__version__)) # noqa
7673

0 commit comments

Comments
 (0)