Create shape layers with javavascript