(c) 2010-2016 Vladimir Agafonkin, (c) 2010-2011 CloudMade
*/
(function (window, document, undefined) {
var L = {
(c) 2010-2016 Vladimir Agafonkin, (c) 2010-2011 CloudMade
*/
(function (window, document, undefined) {
var L = {
- // @event tileload: TileEvent
- // Fired when a tile loads.
- this.fire('tileload', {
- tile: tile.el,
- coords: coords
- });
+ // @event tileload: TileEvent
+ // Fired when a tile loads.
+ this.fire('tileload', {
+ tile: tile.el,
+ coords: coords
+ });
+ }
- * A `Function` that will be used to decide whether to show a feature or not.
- * The default is to show all features:
+ * A `Function` that will be used to decide whether to include a feature or not.
+ * The default is to include all features:
*
* @option coordsToLatLng: Function = *
* A `Function` that will be used for converting GeoJSON coordinates to `LatLng`s.
*
* @option coordsToLatLng: Function = *
* A `Function` that will be used for converting GeoJSON coordinates to `LatLng`s.
// Adds a GeoJSON object to the layer.
addData: function (geojson) {
var features = L.Util.isArray(geojson) ? geojson : geojson.features,
// Adds a GeoJSON object to the layer.
addData: function (geojson) {
var features = L.Util.isArray(geojson) ? geojson : geojson.features,
// Resets the given vector layer's style to the original GeoJSON style, useful for resetting style after hover events.
resetStyle: function (layer) {
// reset any custom styles
// Resets the given vector layer's style to the original GeoJSON style, useful for resetting style after hover events.
resetStyle: function (layer) {
// reset any custom styles
// Changes styles of GeoJSON vector layers with the given style function.
setStyle: function (style) {
return this.eachLayer(function (layer) {
// Changes styles of GeoJSON vector layers with the given style function.
setStyle: function (style) {
return this.eachLayer(function (layer) {