emp3-web
emp3-web copied to clipboard
If Map.drawFreehandExit is called during a freehand draw, the freehand line stays permanently on map
Execute this script and draw for the total of 10 seconds. The timeout will fire and after that the map still has the freehand graphic on the map until drawFreehand is called again. the map needs to remove all freehand graphics prior to exiting freehand mode.:
map0.setFreehandStyle({ initialStyle: { strokeColor: { red: 0, green:255, blue: 0 }
, strokeWidth: 20 } });
map0.drawFreehand(); setTimeout(function() { map0.drawFreehandExit(); }
, 10000);