Skip to content

Commit d36233e

Browse files
authored
Merge branch 'master' into location_init_check
2 parents eedbf9d + cb042c1 commit d36233e

23 files changed

+2952
-179
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
folium/_version.py export-subst

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ before_install:
3333
- export PATH="$HOME/miniconda/bin:$PATH"
3434
- conda update --yes --all
3535
- conda config --add channels conda-forge --force
36-
- conda create --yes -n TEST python=$TRAVIS_PYTHON_VERSION --file requirements.txt --file requirements-dev.txt
36+
- conda create --yes -n TEST python=$TRAVIS_PYTHON_VERSION phantomjs --file requirements.txt --file requirements-dev.txt
3737
- source activate TEST
3838

3939
- if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then
@@ -54,7 +54,7 @@ script:
5454

5555
- if [[ $TEST_TARGET == 'latest_branca' ]]; then
5656
pip install git+https://github.com/python-visualization/branca.git ;
57-
python setup.py test ;
57+
py.test -vv --ignore=tests/notebooks/test_notebooks.py ;
5858
fi
5959

6060
- if [[ $TEST_TARGET == 'notebooks' ]]; then

CHANGES.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1+
0.4.0
2+
~~~~~
3+
- Added support for subdomains options in TileLayer (damselem #623)
4+
15
0.3.0
26
~~~~~
37

8+
- Added style option to 'Timestamped geojson' plugin (soymsk #627)
49
- Switched to `leaflet 1.0.1` (juoceano #531 and ocefpaf #535)
510
- Added `continuous_world`, `world_copy_jump`, and `no_wrap` options (ocefpaf #508)
611
- Update font-awesome to 4.6.3 (ocefpaf #478)

MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ recursive-include folium *.py
44
recursive-include folium *.js
55
recursive-include folium/plugins *
66
recursive-include folium/templates *
7+
include versioneer.py
78
prune examples/

docs/contributing.rst

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
1-
Contributing
2-
============
1+
Contributing to folium
2+
======================
33

4-
Choose the sandbox folder of your choice (`~/sandbox` for example)
5-
::
4+
We welcome contributions to folum in many forms.
65

7-
$ cd ~/sandbox
6+
Examples of contributions include:
87

9-
Clone `folium` from github:
10-
::
11-
12-
$ git clone https://github.com/python-visualization/folium
13-
14-
Push code to your fors, and write a pull request.
15-
16-
TODO: end up this section.
8+
* Code patches
9+
* Documentation improvements
10+
* Bug reports and patch reviews

examples/Features.ipynb

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

examples/Highlight_Function.ipynb

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

examples/Plugins.ipynb

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,104 @@
277277
"\n",
278278
"m # Click on the top right button."
279279
]
280+
},
281+
{
282+
"cell_type": "markdown",
283+
"metadata": {},
284+
"source": [
285+
"## Timestamped GeoJSON"
286+
]
287+
},
288+
{
289+
"cell_type": "code",
290+
"execution_count": null,
291+
"metadata": {
292+
"collapsed": false
293+
},
294+
"outputs": [],
295+
"source": [
296+
"from folium import plugins\n",
297+
"\n",
298+
"m = folium.Map(location=[35.68159659061569, 139.76451516151428], zoom_start=16)\n",
299+
"\n",
300+
"lines = [\n",
301+
" {\n",
302+
" \"coordinates\": [\n",
303+
" [139.76451516151428, 35.68159659061569], # Lon, Lat\n",
304+
" [139.75964426994324, 35.682590062684206],\n",
305+
" ],\n",
306+
" \"dates\": [\n",
307+
" \"2017-06-02T00:00:00\",\n",
308+
" \"2017-06-02T00:10:00\"\n",
309+
" ],\n",
310+
" \"color\": \"red\"\n",
311+
" },\n",
312+
" {\n",
313+
" \"coordinates\": [\n",
314+
" [139.75964426994324, 35.682590062684206],\n",
315+
" [139.7575843334198, 35.679505030038506],\n",
316+
" ],\n",
317+
" \"dates\": [\n",
318+
" \"2017-06-02T00:10:00\",\n",
319+
" \"2017-06-02T00:20:00\"\n",
320+
" ],\n",
321+
" \"color\": \"blue\"\n",
322+
" },\n",
323+
" {\n",
324+
" \"coordinates\": [\n",
325+
" [139.7575843334198, 35.679505030038506],\n",
326+
" [139.76337790489197, 35.678040905014065],\n",
327+
" ],\n",
328+
" \"dates\": [\n",
329+
" \"2017-06-02T00:20:00\",\n",
330+
" \"2017-06-02T00:30:00\"\n",
331+
" ],\n",
332+
" \"color\": \"green\",\n",
333+
" \"weight\": 15,\n",
334+
" },\n",
335+
" {\n",
336+
" \"coordinates\": [\n",
337+
" [139.76337790489197, 35.678040905014065],\n",
338+
" [139.76451516151428, 35.68159659061569],\n",
339+
" ],\n",
340+
" \"dates\": [\n",
341+
" \"2017-06-02T00:30:00\",\n",
342+
" \"2017-06-02T00:40:00\"\n",
343+
" ],\n",
344+
" \"color\": \"#FFFFFF\",\n",
345+
" },\n",
346+
" \n",
347+
"]\n",
348+
"\n",
349+
"\n",
350+
"features = [\n",
351+
" {\n",
352+
" \"type\": \"Feature\",\n",
353+
" \"geometry\": {\n",
354+
" \"type\": \"LineString\",\n",
355+
" \"coordinates\": line[\"coordinates\"],\n",
356+
" },\n",
357+
" \"properties\": {\n",
358+
" \"times\": line[\"dates\"],\n",
359+
" \"style\": {\n",
360+
" \"color\": line[\"color\"],\n",
361+
" \"weight\": line[\"weight\"] if \"weight\" in line else 5\n",
362+
" }\n",
363+
" }\n",
364+
" }\n",
365+
"for line in lines]\n",
366+
"\n",
367+
"\n",
368+
"plugins.TimestampedGeoJson({\n",
369+
" \"type\": \"FeatureCollection\",\n",
370+
" \"features\": features,\n",
371+
"}, period=\"PT1M\", add_last_point=True).add_to(m)\n",
372+
"\n",
373+
"\n",
374+
"m.save(os.path.join('results', 'Plugins_5.html'))\n",
375+
"\n",
376+
"m"
377+
]
280378
}
281379
],
282380
"metadata": {
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
,dep,dest,geojson
2+
0,Place_MontpellierMediterranee_Airport,Place_BastiaPoretta_Airport,"{""type"": ""LineString"", ""coordinates"": [[3.961389, 43.583333], [3.968056, 43.580833], [3.974722, 43.578333], [3.986389, 43.575278], [3.998333, 43.5725], [4.163333, 43.530556], [4.269167, 43.503889], [4.398889, 43.471111], [4.540278, 43.435278], [4.716944, 43.390556], [4.917222, 43.34], [4.928889, 43.336944], [5.159722, 43.276667], [5.333056, 43.231667], [5.729722, 43.229167], [5.828889, 43.228611], [6.023889, 43.226667], [6.601944, 43.219444], [6.841667, 43.346111], [6.893333, 43.373333], [7.3625, 43.327778], [7.621389, 43.301944], [8.303056, 43.170833], [8.434722, 43.145556], [8.626944, 43.118333], [8.759167, 43.099722], [9.059444, 43.057222], [9.083333, 43.053889], [9.395556, 42.978333], [9.488333, 42.955833], [9.603889, 42.927778], [9.574444, 42.847222], [9.568056, 42.829444], [9.542222, 42.758889], [9.526111, 42.714722], [9.513333, 42.679444], [9.506944, 42.661944], [9.474722, 42.573611], [9.484722, 42.55]]}"
3+
1,Place_Bristol___Lulsgate,Place_TenerifeSur_ReinaSofia_Airport,"{""type"": ""LineString"", ""coordinates"": [[-2.719167, 51.382778], [-2.736111, 51.382778], [-2.787222, 51.382222], [-2.838333, 51.381944], [-2.866389, 51.366111], [-2.894722, 51.350278], [-2.998056, 51.2925], [-3.359722, 51.178611], [-3.362778, 51.161111], [-3.371944, 51.108889], [-3.384167, 51.039167], [-3.388611, 51.013056], [-3.398056, 50.957778], [-3.416944, 50.8475], [-3.423889, 50.809167], [-3.431944, 50.761667], [-3.448333, 50.666667], [-3.4525, 50.641389], [-3.463889, 50.574167], [-3.473333, 50.518611], [-3.493611, 50.398611], [-3.495556, 50.362778], [-3.505278, 50.184167], [-3.517222, 49.960556], [-3.529444, 49.737222], [-3.558333, 49.658611], [-3.638611, 49.44], [-3.728333, 49.195278], [-3.783056, 49.046944], [-3.808611, 48.976944], [-4.061667, 48.301944], [-4.184722, 47.957222], [-4.3125, 47.829444], [-4.524722, 47.591389], [-4.990556, 47.079167], [-5.408056, 46.612778], [-6.919722, 44.835278], [-7.012778, 44.698056], [-7.143889, 44.504444], [-8.926667, 41.872778], [-9.016111, 41.667778], [-9.161389, 41.334444], [-10.234444, 38.873333], [-11.448333, 35.966667], [-12.911667, 34.261111], [-13.836111, 33.149444], [-15.301667, 31.300833], [-15.850278, 30.433889], [-16.372778, 29.591389], [-16.990556, 28.928056], [-17.023056, 28.893333], [-17.094444, 28.816389], [-17.211667, 28.690833], [-17.263611, 28.635], [-17.315556, 28.579167], [-17.374167, 28.516389], [-17.439167, 28.446389], [-17.452222, 28.4325], [-17.375278, 28.389444], [-17.29, 28.341667], [-17.196111, 28.289167], [-17.170556, 28.274722], [-17.115, 28.234444], [-17.027778, 28.170833], [-16.877222, 28.061389], [-16.773056, 28.028889], [-16.687778, 28.0025], [-16.676389, 28.006667], [-16.647222, 28.017222], [-16.622222, 28.026389], [-16.604167, 28.033056], [-16.5725, 28.044444]]}"
4+
2,Place_Valencia_Manises_Airport,Place_Bucuresti_HenriCoanda_Airport,"{""type"": ""LineString"", ""coordinates"": [[-0.481667, 39.489444], [-0.492222, 39.493611], [-0.534167, 39.510556], [-0.576389, 39.527222], [-0.566111, 39.531389], [-0.504722, 39.555833], [-0.453611, 39.576111], [-0.381944, 39.604722], [-0.340833, 39.621111], [-0.228333, 39.666111], [-0.207778, 39.674167], [-0.045278, 39.801944], [-0.004722, 39.833889], [0.046944, 39.870833], [0.15, 39.944444], [0.270278, 40.030556], [0.407778, 40.128889], [0.5625, 40.239722], [0.588333, 40.258056], [0.888333, 40.469167], [1.003056, 40.549722], [1.062222, 40.590833], [1.231667, 40.708611], [1.258056, 40.726944], [1.451944, 40.860833], [1.505833, 40.897778], [1.730278, 41.051389], [1.853056, 41.134722], [2.107778, 41.307222], [3.187222, 41.494444], [3.488611, 41.544722], [3.860278, 41.605556], [4.666667, 41.733333], [5.013333, 41.81], [5.396389, 42.157778], [5.709722, 42.438333], [6.180278, 42.853611], [6.601944, 43.219444], [6.841667, 43.346111], [6.893333, 43.373333], [7.23, 43.549167], [7.371111, 43.622222], [7.632778, 43.756944], [7.653056, 43.7675], [7.755278, 43.819444], [8.221111, 44.056111], [8.803611, 44.134722], [9.054722, 44.194722], [9.594167, 44.321667], [10.1625, 44.484167], [10.822222, 44.672778], [12.281389, 45.071111], [12.649722, 45.032778], [12.801944, 45.016944], [13.091389, 44.985833], [13.918056, 44.8925], [14.876111, 44.707222], [15.533056, 44.575], [16.143333, 44.448333], [16.305556, 44.413889], [16.593889, 44.351944], [16.816389, 44.303611], [17.661389, 44.115833], [19.105, 44.596389], [19.223889, 44.605833], [19.362778, 44.616944], [20.776667, 44.722778], [21.169444, 44.748889], [21.533333, 44.771667], [22.610556, 44.778611], [23.448889, 44.772222], [23.5125, 44.771667], [23.652222, 44.770833], [23.880833, 44.768889], [23.9825, 44.768333], [24.211111, 44.766389], [24.490556, 44.764444], [24.643056, 44.763333], [24.668333, 44.763056], [24.782222, 44.760833], [25.161389, 44.753889], [25.423889, 44.6325], [25.55, 44.574167], [25.623611, 44.540278], [25.698333, 44.545278], [25.823056, 44.553611], [25.922778, 44.560278], [26.085, 44.571111]]}"

folium/__init__.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@
1717
TopoJson, WmsTileLayer
1818
)
1919

20-
__version__ = '0.4.0.dev0'
20+
21+
from ._version import get_versions
22+
23+
__version__ = get_versions()['version']
24+
del get_versions
2125

2226
__all__ = [
2327
'CssLink',

0 commit comments

Comments
 (0)