- Round bounds size. (by @perliedman) #4377
- Workaround for flyTo bug (by @hyperknot) #4376
- Make sure bounds are bounds before testing its validity in fitBounds (by @yohanboniface) #4375
- Remove use of ES5 function (map). Close #4362. (by @perliedman) #4373
- Switch prosthetic-hand to 1.3.0 and use onStop callback (by @IvanSanchez) #4372
- Make L.Control.Layers.collapse/expand public methods (by @yohanboniface) #4370
- Use mean earth radius for distance calculation in L.CRS.Earth. (by [@perliedman](https://github.com/perli
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* A Draggable that does not update the element position | |
and takes care of only bubbling targetted path in Canvas mode. */ | |
L.PathDraggable = L.Draggable.extend({ | |
initialize: function (path) { | |
this._path = path; | |
this._canvas = (path._map.getRenderer(path) instanceof L.Canvas); | |
var element = this._canvas ? this._path._map.getRenderer(this._path)._container : this._path._path; | |
L.Draggable.prototype.initialize.call(this, element, element, true) | |
L.DomUtil.addClass(element, 'leaflet-path-draggable'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require("request"), | |
mapnik = require('mapnik'), | |
zlib = require('zlib'); | |
request({ | |
uri: "http://vector.mapzen.com/osm/all/17/66388/45097.mvt", | |
// uri: "http://carto.data.gouv.fr/vector/all/17/66386/45096.mvt", | |
encoding: null | |
}, function(error, resp, body) { | |
var info, compression; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
— HOT | |
* Building digitizing | |
building => yes | |
source => … | |
note => … | |
* Building features | |
building | |
building:levels | |
building:material | |
building:roof |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT way , | |
name , | |
amenity , | |
shop , | |
tourism , | |
highway , | |
man_made, | |
access , | |
religion, | |
waterway, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' /> | |
<script src='./mapbox.js'></script> | |
<script src='./leaflet.markercluster-src.js'></script> | |
<link href='./mapbox.css' rel='stylesheet' /> | |
<link href='./MarkerCluster.css' rel='stylesheet' /> | |
<link href='./MarkerCluster.Default.css' rel='stylesheet' /> | |
<!--[if lte IE 8]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
cd src/download | |
echo ${PWD} | |
if test -z "$1" | |
then | |
echo "Use ./script/fetch.sh W,S,E,N; ex.: 58,13,59,12" | |
exit 0 | |
fi | |
A=$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
import pytest | |
def smart_struncate(s, length=100, suffix='…'): | |
# Be smart here. | |
return s | |
@pytest.mark.parametrize('given,expected,length,suffix', [ | |
[u'Ceci est une longue phrase qui pourrait éventuellement servir de titre à billet de blog mais est vraiment beaucoup trop longue', # noqa | |
u'Ceci est une longue phrase qui pourrait éventuellement servir de titre à billet de blog mais est…', None, None], # noqa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<title>Test case for moz-transform strange behaviour</title> | |
<style type="text/css"> | |
#container { | |
-moz-transform: translate(529px, 258px); | |
} | |
</style> | |
</head> | |
<body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
L.Marker.include({ | |
geometry: function() { | |
/* Return a GeoJSON geometry Object */ | |
var latlng = this.getLatLng(); | |
return { | |
type: "Point", | |
coordinates: [ | |
latlng.lng, | |
latlng.lat | |
] |