i have a basic geoJson program in javascript by using leaflet API.
Last time I've used
map._onResize();
and that help me refresh map. Maybe a little hack, but, it work.
In your code will be area._onResize()
P.S: Maybe you should try change the way to set new opacity value - try change
function clicked(){
this.options.style.fillOpacity = 0.8;
}
to that
function clicked(){
this.setStyle({fillOpacity: 0.2});
}
map.invalidateSize();
map._onResize()
- it's a hack, and there is no guarantee that it won't be removed in future versions.
area.fitBounds(area.getBounds());