PluginProbe
Leaflet Map / 2.16.2
Leaflet Map v2.16.2
3.4.7 3.4.6 trunk 2.10.0 2.10.1 2.11.0 2.11.1 2.11.2 2.11.3 2.11.4 2.11.5 2.12.0 2.13.0 2.14.0 2.15.0 2.16.0 2.16.1 2.16.2 2.17.0 2.17.1 2.17.2 2.17.3 2.18.0 2.19.0 2.19.1 All 49 releases
leaflet-map / scripts / leaflet-ajax-geojson.min.js

leaflet-ajax-geojson.min.js in Leaflet Map 2.16.2, at scripts/leaflet-ajax-geojson.min.js

2 lines 886 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 L.AjaxGeoJSON=L.GeoJSON.extend({options:{type:"json"},initialize:function(e,t){L.setOptions(this,t),this._url=e,this.layer=L.geoJson(null,this.options)},onAdd:function(e){var t,n=this,s=this.options.type;this.map=e,e.addLayer(this.layer),this.request||(this.request=t=new XMLHttpRequest,t.onreadystatechange=function(){var e;t.readyState===t.DONE&&200===t.status&&("json"===s?e=JSON.parse(t.responseText):-1!==["kml","gpx"].indexOf(s)&&(e=window.toGeoJSON[s](t.responseXML)),n.json=e,n.layer.addData(e),n.fire("ready"))},t.open("get",this._url,!0),t.send()),this.fire("add")},eachLayer:function(e){this.layer.eachLayer(e)},setStyle:function(e){this.layer.setStyle(e)},resetStyle:function(e){this.layer.resetStyle(e)},onRemove:function(e){this.map.removeLayer(this.layer)},getBounds:function(){return this.layer.getBounds()}}),L.ajaxGeoJson=function(e,t){return new L.AjaxGeoJSON(e,t)};
2