javascript - How to make rectangle visible until another rectangle draw -
i'm trying draw rectangle on google map. bound values after draw rectangle successful.but rectangle not visible problem. please me visible rectangle until rectangle draw.
in on 'click' event listener rectangle removing setting setmap(null), , setting bounds minimal values. should remove these lines , on 'mousemove' event check 'state' variable instead of using getmap
if (state==1) { rect.setbounds(tobounds(pt1, event.latlng)); }
see updated jsfiddle
Comments
Post a Comment