How to bind popup in the centre of a layer react leaflet

المشرف العام

Administrator
طاقم الإدارة
I have a component with component with in it. I want to bind a popup in onEachFeature method.

I have successfully done layer.bindpopup(); but don't know how to bind it to the centre of the geoJson layer.

adding a in and doing this.refs.popup.getLeafletElement() throws an error, so I am not being able to use popup.setLatlang()

Any kind of help would be really helpful.



أكثر...
 
أعلى