2

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

/*layer*/
 var layer = new L.GeoJSON.AJAX("GIS/layer/request_layer.php", {
 middleware:function(data){ 
 return L.geoJson(data, {
 onEachFeature: function(feature, layer){
 layer.bindPopup("<center>" + feature.properties.id + "<center>"),
 layer.setIcon(icon);
 }
 }).addTo(map);
 }
 });
/*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 ?

asked Jun 5, 2017 at 9:34

2 Answers 2

2

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

answered Jun 7, 2017 at 15:03
1

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.

answered Jun 5, 2017 at 9:55

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.