i'm newbie in GIS. i'm trying to make webgis using leaflet. i already make layer with icon in leaflet.

    var layer = new L.GeoJSON.AJAX("GIS/layer/request_layer.php", {
        return L.geoJson(data, {
            onEachFeature: function(feature, layer){
                layer.bindPopup("<center>" + feature.properties.id + "<center>"),

/*icon layer*/
    var icon = L.icon({
            iconUrl : 'GIS/leaflet/images/icon.png',
            iconSize : [15,15],
            popupAnchor : [0, -28]

how to add buffer in this layer ?

2 Answers 2


Another easy option is Turf JS. It's easy to use with Leaflet. http://turfjs.org/docs/#buffer


Use the Buffer plugin for leaflet. If you are new to GIS and Leaflet then I recomend you spend some time reviewing all the plugins that are available to you as there are a lot and you'll find many of the invaluable for your purposes.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.